Design of a Methodology to Evaluate the Impact of Demand-Side Management in the Planning of Isolated/Islanded Microgrids

: The integration of Demand-Side Management (DSM) in the planning of Isolated/Islanded Microgrids (IMGs) can potentially reduce total costs and customer payments or increase renewable energy utilization. Despite these beneﬁts, there is a paucity in literature exploring how DSM affects the planning and operation of IMGs. The present work compares the effects of ﬁve different strategies of DSM in the planning of IMGs to fulﬁll the gaps found in the literature. The present work embodies a Disciplined Convex Stochastic Programming formulation that integrates the planning and operation of IMGs using three optimization levels. The ﬁrst level ﬁnds the capacities of the energy sources of the IMG. The second and third levels use a rolling horizon for setting the day-ahead prices or the stimulus of the DSM and the day-ahead optimal dispatch strategy of the IMG, respectively. A case study shows that the Day-Ahead Dynamic Pricing DSM and the Incentive-Based Pricing DSM reduce the total costs and the Levelized Cost of Energy of the project more than the other DSMs. In contrast, the Time of Use DSM reduces the payments of the customers and increases the delivered energy more than the other DSMs.


Introduction
Despite the efforts of governments around the world, access to electric energy in isolated regions remains a challenge [1,2]. Isolated/Islanded Microgrids (IMGs) could play a significant role in providing power to these areas where extending the utility grid is not economically feasible [3]. The implementation of Demand-Side Management (DSM) in the planning of Microgrids (MGs) reduces total costs, Levelized Cost of Energy (LCOE), and customer payments, or increases renewable energy utilization [4][5][6][7][8][9]. In this regard, it seems interesting to investigate if the application of DSMs in the planning of IMGs can bring similar benefits. Despite this, there is a paucity of literature exploring how DSMs can affect IMGs' planning and operation.
The implementation of DSM aims to affect the patterns of consumer consumption using direct or indirect strategies [10,11]. Direct strategies are composed of Direct Load Control and Interruptible/Curtailable Programs. In Direct Load Control strategies, there is a remote controller sending signals to customers' appliances, like air conditioners, heating systems, water heaters, or public lighting, on short notice. The signals can turn the appliances on/off, switch tariffs, or inform about current electricity prices. Interruptible/Curtailable Programs offer alternatives as biding system frequency regulation, control schemes, and transient stability [13]. DSMs can partially solve some of the inherent challenges of planning IMGs. Chauhan et al. propose to compute the sizing of the energy sources of an IMG considering a DSM that reschedules shiftable loads depending on if it is the winter or summer season [27]. The work uses an Integer Linear Programming (ILP) formulation to find the optimal rescheduling of shiftable loads and a Discrete Harmony Search algorithm to compute the sizing. A considerable drawback of the work is that the DSM only focuses on reducing the peak demand while ignoring maximizing exploitation of renewable energy. Amrollahi et al. combine an MILP formulation and the capabilities of HOMER software to compute the sizing of an IMG composed only of renewable energy sources [28]. Due to the lack of dispatchable energy sources, the authors propose the use of a DSM to reschedule shiftable loads. Rescheduling helps to balance mismatch between electric energy generation and consumption. Mehra et al. propose a work to measure the economic value of applying DSM in the sizing of a nanogrid [29,30]. The work considers the dis-aggregation of electrical demand in critical and non-critical appliances. In addition, the work takes advantage of low-cost computation intelligent devices, such as the "utility-in-a-box" solution, to implement active DSM [31]. The authors use an exhaustive search algorithm to determine the capacities of the Photo-Voltaic (PV) system and the BESS. Nevertheless, the work considers the effects of only one kind of DSM over a small-sized grid.
Prathapaneni et al. propose a multi-objective stochastic sizing algorithm that aims to minimize lifetime costs and degradation of the energy sources [32]. The work considers the effects of a DSM that uses shiftable loads, like electric vehicles or pumped hydro storage in an IMG. The work uses an Accelerated Particle Swarm Optimization (APSO) to compute the sizing of energy sources. Despite considering lifetime costs of the IMG and degradation of energy sources, the work considers a basic DSM over reduced amounts of loads that are not always present in IMG applications. Luo et al. propose a sizing methodology for an IMG using a bi-level optimization algorithm [33]. The first level computes the energy sources' capacities, considering the effects of different combinations of public subsidies for the installation of energy sources. The second level performs the dispatch strategy for the energy sources of the IMG using an MINLP formulation. In the second level of optimization, the authors implement a rescheduling mechanism of shiftable loads. A study case shows that DSM reduces installed capacities of the energy sources for the IMG.
Kiptoo et al., similarly to [28], aimed to implement a DSM to balance generation and electricity demand in an IMG only composed of renewable energy sources [34]. The DSMs consider rescheduling shiftable loads. However, the authors aim to improve the work of [28] by adding an electrical demand forecasting module using a Random Forest (RF) regression forecasting approach. The work shows that the proposed methodology reduces the total costs of the IMG project by 12.41%. Rehman et al. used HOMER software to find capacities of energy sources in an IMG [35]. The work considers a DSM capable of rescheduling shiftable loads and uses Simulink to evaluate the operation of the IMG. The use of Simulink allows the authors to design and test a model predictive control. The model predictive control controls the power during grid-connected operation and regulates load voltage in the islanding operation of the MG. Table 1 summarizes the works found in the literature that deal with the integration of DSM in the planning of IMGs, and that highlight knowledge gaps and the characteristics of the present work. It is vital to notice that Table 1 presents only the articles that consider IMGs because they are strictly related to the present work. Study of subsidies impacts over economic feasibility [33] Forecasting impacts in the operation [34] Validation of operation after sizing [35] Tariff Despite that some of the works found in the literature evaluate the effects of DSM in the planning phase of MGs and IMGs, none of them compare the effects of different DSMs using the same test-bench. The works found by authors do not focus on design and impact evaluation of DSM over total costs and operational aspects of IMG projects. Moreover, few of the works consider the financial aspects of the cooperation between private and public capital to fund IMG projects. Additionally, none of them allow defining tariffs that guarantee the sustainability of the IMG project over time. In this regard, the present article aims to fulfill gaps found in the literature review by providing a methodology capable of:

•
Obtaining the optimal sizing and the optimal energy dispatch strategy of an IMG project using a Disciplined Convex Stochastic Programming formulation.

•
Obtaining the optimal energy tariffs and stimulus for the DSM to guarantee the financial viability of an IMG project.

•
Evaluating the impacts of different strategies of DSMs over sizing, energy management, and costs of an IMG project in a case study. • Implementing and evaluating different DSMs in the planning of IMGs using the same test-bench.
The formulation uses flat, ToU, CPP, DADP, and Incentive-Based Pricing (IBP) tariffs as DSM strategies. It also proposes a Direct Load Curtailment (DLC) strategy that curtails customers' electrical demand if required.
The formulation assumes that the DSMs modify the patterns of consumption of the customers, which will lead to a change in the capacities of energy sources [36][37][38][39]. The results of the application of the methodology provide the optimal size of the energy sources, the optimal energy dispatch, the optimal tariffs, the economic incentives, and the load curtailment. The rest of the article proceeds as follows: Section 2 presents the definition of the problem and the proposed solution. Section 3 presents a case study as an example of the application of the methodology, and Section 4 includes its results and analysis. Finally, Section 5 presents the conclusions of the work and future directions.

Definition of the Problem and Proposed Solution
The present work aims to illustrate for planners and policymakers the benefits of applying DSM for IMG planning. For that purpose, the methodology integrates sizing and IMG operation using three different optimization levels, as shown by Figure 1. The first level obtains the sizes of energy sources using a Monte Carlo analysis. The second level uses a day-ahead rolling horizon over the same optimization horizon of the first level to define incentives, tariffs, and load curtailment of each of the strategies of DSM. Finally, the third level simulates the microgrid operation by iterating in the same rolling horizon that the second level uses. The third level performs the simulation to compute the optimal dispatch strategy after weather and demand profiles are known.
The rolling horizon computes one day in advance at each time and rolls over one year. Each day, the second level computes the proper day-ahead DSM stimulus that the third level uses to compute the day-ahead response of the customers. The second level computes these stimuli using day-ahead forecasts of electrical demand. The third level applies the stimulus found in the second level to compute the customers' response. While the first and second level assess the uncertainties in day-ahead forecasts of the demand and in weather variables, the third level assumes perfect knowledge of these variables. This assumption allows the methodology to compute the impacts of errors in forecasts over the DSM performance. The formulation computes the total costs of operation on the third level. Sections 2.1-2.3 present a detailed explanation of each of the levels. Appendix A, present in Table A1 a description of all the variables used in the following sections with their respective names and units.

First Level: Sizing
The formulation of the first optimization level a 1 can be stated as: where x represents the decision variables, ξ represents the uncertainties of the electrical demand, b i , i = 1, . . . , B are convex functions in x for each value of the random variable ξ, and c i , i = 1, . . . , C are deterministic affine functions. Since a 1 ,b i , i = 1, . . . , B and c i , i = 1, . . . , C are convex on x, the definition of Formulation (1) is a convex optimization problem [40] ( [41], Chapter 7). IMG projects can receive funding from public or private capital. To compute the effects of the funding sources over the total costs, profits, and customer payments, the formulation of a 1 introduces factors ϕ cg , ϕ ci , ϕ og , and ϕ oi , where ϕ ci + ϕ cg = 1 and ϕ oi + ϕ og = 1. The formulation of a 1 is designed to minimize the Capital Expenditures (CAPEX) and the Operational Expenditures (OPEX) of the IMG. Equations (2)-(10) describe the formulation of a 1 .
where the CAPEX (ζ) and OPEX (ϑ) refer to: and C u , I u , λ u,t , Λ u,t , and E u,t represent the installed capacity, unitary investment cost, unitary dispatch costs, unitary maintenance costs, and dispatched energy by the u energy source, respectively. It is worth noting that the formulation of Equation (2) replaces minimize with argmin, and assigns the results to the variable X 1 . This replacement occurs because the second and third methodology levels require the values of the decision variables , but not the value of the achieved minimum. The rest of the optimization formulations in the document maintain the replacement.
The proposed formulation considers the energy prices as the only revenue stream for the investors. Equation (5) introduces a constraint to guarantee that the private investors recover their investments and the expected Internal Rate of Return R.
where ϕ ci and ϕ oi represent the percentage of payments of the private investor for the CAPEX and OPEX costs, and π n,t represents the prices of the n tariff. Equation (6) considers the elasticity (e t ) of the customers at a time t, the initial price of the energy (π f lat ), and the initial demand (D o,t ) to compute the final demand (D f ,t ). Equation (7) introduces an energy conservation factor Ψ c to define how the total energy consumption over the optimization horizon changes after the introduction of DSM. Values of Ψ c ≤ 1 decrease the total energy consumption, while values of Ψ c ≥ 1 increase the total energy consumption over the optimization horizon. A value of Ψ c = 1 indicates that the total energy consumption over the optimization horizon remains constant after the introduction of DSMs.
The formulation of a 1 also includes the energy balance Equation (8), a constraint that limits energy excess (EE t ), and a constraint that limits the lack of energy (LE t ), (9) and (10), respectively. Equations (9) and (10) introduce the parameter z to control the desired level of reliability in the IMG.
Additionally, the a 1 formulation includes Equations (14) till (26) in order to evaluate the impact of DSM strategies on the sizing of the IMG (changing the horizon from 24 to 8760 h, respectively).

Second Level: Setting of Day-Ahead DSM Values
The formulation of the second optimization level a 2 solves the following problem: where EE F h and LE F h are the 24 day-ahead forecasted energy excess (a non-positive variable) and the forecasted lack of energy (a non-negative unrestricted variable), respectively, and ω is a penalization factor. E F u,h and d F f ,h represent the 24 day-ahead forecasted dispatch of the u energy sources and the 24 day-ahead forecasted electrical demand, respectively.
The formulation of the second optimization level a 2 uses the capacities C u , the day-ahead forecasts of energy resources G F h , and forecasts of electric demand d F o,h as inputs in order to compute the day-ahead stimulus for the five Γ n,h DSM strategies. Four of the DSM strategies use π n in Equation (5) as an indirect stimulus to modify the customer consumption patterns. Those four DSM strategies are: Time of Use pricing (ToU), Critical Peak Pricing (CPP), Day-Ahead Dynamic Pricing (DADP), and Incentive-Based Pricing (IBP). The last DSM uses a Direct Load Curtailment strategy that sheds a percentage of load when required. The baseline case for comparisons uses a flat tariff and no DSM. The description of the baseline case and each of the DSMs proceeds in the following subsections [42].

Flat Tariff (Baseline Case)
In general terms, the unitary value of a flat tariff is the sum of all the costs of producing the energy divided by the total amount of energy produced [43]. Equation (13) describes the yearly payments using a regular flat tariff.
However, this traditional approach does not set an optimal tariff to recover investments while minimizing energy costs. Here, we propose the introduction of a decision variable π f lat into the formulation to find the optimum price for the tariff.

Time of Use Tariff
ToU tariffs vary daily or seasonally on a fixed schedule, using two or more constant prices [44]. One of the main benefits of this type of tariff is its stability over long periods, which gives the customer a better ability to adapt to it [45,46]. To create a ToU tariff, the planner must define the number of Y blocks and the starting and ending hours of each y block [45]. The optimization problem considers the prices π y of the Y number of blocks as decision variables to be computed. Equation (15) presents the yearly payments using Y different block hours of prices.
The methodology computes the ToU and flat tariffs in the first optimization level a 1 and the demand response of the customers in the third level a 3 . The second level is not used for the flat tariff and the ToU tariff because they do not have daily variations. The algorithm computes the flat and ToU tariffs following the same process used to find the capacities of the energy sources C u , using adapted versions of Equations (30) and (31).

Critical Peak Pricing
The CPP tariff can be 3 to 5 times higher than the usual tariff, but is allowed only a few days per year [46]. In Equation (16), π base is a scalar variable that is chosen to be equal to the flat tariff π f lat . π peak is a decision variable of dimension 24 and is computed one day in advance. Equation (16) defines the day-ahead forecasted payments using a CPP tariff, and Equation (17) defines the day-ahead hourly critical peak price.
A critical forecasted event, such as high demand or low generation capacity, triggers the critical peak price in a CPP tariff. In this regard, the CPP tariff must include a predictor of the critical event and a decision mechanism to set the value of the critical price. The first optimization level formulation a 1 uses historical data, which implies that the formulation has full knowledge over the optimization horizon (T = 8760 h). The perfect knowledge allows the formulation to state constraint (18), which limits the apparition of the critical price only to a few hours in a year. Equation (18) uses variable ϕ peak to control the number of hours with critical price allowed and δ peak to define how many times the base price π base is scaled up. The planner defines ϕ peak δ peak , and π base , π peak , τ base , and τ peak are decision variables that the optimization formulation computes. T ∑ t=1 π peak,t ≤ ϕ peak Tδ peak π base (18) However, in order to simulate the operation of the IMG, the rolling horizon will only know the forecasts one day in advance. The formulation must define a mechanism to determine the conditions that allow the critical peak price to take place. Thus, it defines the critical event as low daily forecasted primary energy resources (lower than a predefined threshold ). The decision mechanism sets the day-ahead value of the critical price using the variable π F peak,h . Equation (19) describes the mechanism to set the CPPs in the operational phase of the IMG.
2.2.4. Day-Ahead Dynamic Pricing DADP refers to a tariff that is announced one day in advance to customers and has hourly variations. This scheme offers less uncertainty to customers than "hour-ahead pricing" or "real-time pricing," thus allowing them to plan their activities [47,48]. Equation (20) introduces the day-ahead payments under a DADP tariff, using π F h as a decision variable vector of dimension 24.

Incentive-Based Pricing
The IBP tariff provides discounts in the tariff to the customers to increase the electric energy consumption or an extra fare to penalize it. The planner can decide the IBP base price to be equal to the flat tariff π f lat to guarantee a constant value each day. Variable π F inc,h computes the day-ahead hourly incentives and can take positive or negative values. Equation (21) defines the day-ahead payments using the IBP tariff.
All of the N tariffs must have restrictions to avoid null or excessive pricing. Governments, policymakers, or IMG owners can guarantee fair tariffs to the customers with constraint (22).

Direct Load Curtailment Strategy
The DLC strategy curtails a portion F h out of forecasted demand if required. The planner of the IMG decides the percentage of curtailed demand κ. The final demand and day-ahead payments are defined as follows: The general restrictions for the DLC strategy are defined as follows:

Third Level: Real Operation of the IMG
The formulation of the third optimization level a 3 solves the following problem: where the formulation computes the real dispatch of energy sources using capacities C u , real energy resources G R h , real final electric demand d R f ,h , and the energy prices π n of each DSM in order to compute the real dispatch of the U energy sources of the IMG.
In addition to Equations (27) and (28), the formulation of a 3 must include physical restrictions for all the U energy sources used to design the IMG (maximum battery charge and discharge rates, maximum power generator output, amongst others). It is essential to highlight that EE R h and LE R h in the third level refer to energy that generators produce in excess and energy that the generators can not provide, respectively. The first level constrains the allowed quantity of excess (Equation (9)) and lack (10) of energy. The second level uses a penalization factor for these variables (Equation (11)). However, the third level is just an accumulator, a counter of these quantities.

Case Study
The case study aims to illustrate the capabilities and performance of the proposed methodology and considers the design of an IMG composed of a PV, a BESS, and a Diesel Generator (DG) System, as Figure 2 shows. The case study assumes that the microgrid can have two different types of load. The case study uses the load type one when the planner chooses a DSM based on price. The load type one has Smart Meters. The case study uses the second type of load when the planner decides to use the DSM based on DLC. The second type of load has a device as "GridShare" to perform the curtailment of the electrical demand [31]. The case study considers six IMG designs: Baseline case (flat tariff and no DSM) and one design for each of the proposed DSM (ToU, CPP, DADP, IBP, DLC). The results of the designs using DSM are compared with the baseline case design. All of the optimization formulation was written in Python 3.7 using the CVXPY 1.0 package [49,50]. The selected solver is MOSEK, due to its flexibility, speed, and accuracy [51,52].
The case study includes a Monte Carlo Sampling (MCS) approach to deal with the uncertainties of the stochastic formulation. The MCS approach builds different scenarios by sampling the Probability Distribution Functions (PDFs) of electrical demand. In order to build scenarios, a pre-processing step fits the historic electrical demand into monthly/hourly PDFs. For simplicity and for the sake of reduction in computational burden, the case study assumes the demand follows a Gaussian process without a covariance matrix. Afterwards, a random sampling process of the monthly/hourly PDFs builds the demand for each sample s of the MCS approach. Equation (29) describes the sampling process. Figure 3 shows monthly/hourly fitted distributions using a continuous line to represent the mean and a shaded area to represent the standard deviation.
In Equations (2), (11) and (27), X 1 , X 2 , and X 3 represent the S solutions of minimizing a 1 , a 2 , and a 3 , respectively. The C u capacities of the energy sources selected for the IMG in the first level must supply 95% of the S electrical demands with z level of reliability (as defined by Equation (10)). A post-processing step fits the C u results to a PDF φ u , and obtains the Cumulative Distribution Function (CDF) Φ u . The evaluation of the inverse of the CDF Φ u at 0.95 provides the values of energy source capacities C u . These values will supply electrical demand with the desired reliability level 95% of the time (95% of all the scenarios).

Geographic and Weather Conditions of the Case Study
The case study is located at longitude 77 16 8 West and latitude 5 41 36 North (Nuquí, Colombia). The study case uses the Meteonorm database of the PvSyst software to obtain the Global Horizontal Radiation (GHI) and temperature conditions of the geographical region. Additionally, the study case uses Homer Pro software to obtain a standard community electrical demand. The standard community electrical demand that Homer Pro provides has hourly steps over a one-year horizon. Figure 4 shows the historic yearly standard profile of the electrical demand that Homer Pro provides. Figure 5 shows the yearly GHI. Figure 6 shows the yearly temperature.  (29) builds the scenarios for the stochastic analysis using the standard community electrical demand obtained from Homer Pro (shown in Figure 4) and a scale factor of 20. The cost of diesel used for the optimization is 0.75 USD/liter. The case study takes the Diesel Generator model from [53], the PV system model from [54][55][56], and the BESS model from [57]. Table 2 summarizes the unitary installation and maintenance costs of the equipment obtained from regional providers. The values assigned to π n,min and π n,max in constraint (22) are 0 USD/kWh, and two times the price of the current flat tariff of urban areas in Colombia, 0.34 USD/kWh, respectively [58]. Additionally, the methodology takes as inputs the values of Ψ c , e, ϕ cg , ϕ ci , ϕ og , ϕ oi , ω, κ, G H h , I u , λ u , Λ u , and S. Planners or policymakers can decide these values or perform sensitivity analyses over each of them. Table 3 shows the values used for simulations in this work. The following section uses the MCS approach and the inputs of Table 3 to compute the results and for the case study.

Results and Analysis
The case study aims to evaluate the effects of five different DSMs over the optimization results of the proposed formulation. The five considered DSMs are ToU, CPP, DADP, IBP, and DLC. The study case evaluates different aspects of the effects of the DSMs. Section 4.1 shows the average of each of the tariffs and the curtailment of the DLC strategy. Section 4.2 shows the effects of the DSMs over the sizing of the energy sources of the IMG. Section 4.3 aims to analyze the impacts of the DSMs over the economic aspects of the microgrid. This section analyzes the impacts of DSMs over total costs, profits of private investors, customer payments, and LCOE. Additionally, the section considers the delivered energy and fuel consumption. Section 4.4 presents the effects of the forecast errors over the operation of the IMG. Section 4.5 presents percentage variations in crucial indicators as total cost of the project and LCOE between the first and the third optimization levels. Finally, Section 4.6 shows a comparison of the performance of all the DSMs.

Demand Side Management Analysis
Each of the Γ n DSM strategies uses a different stimulus to modify customer consumption patterns. Γ ToU , Γ CPP , Γ DADP , and Γ IBP use tariffs as an indirect stimulus to modify those patterns. Figure 7 shows the average daily stimulus and the Standard Deviation (STD) of the DSMs. The lines represent daily averages of the DSM strategies, and shaded area represents STDs.

Price [USD]
Flat price ToU price CPP price DADP price Ince price DLC price STD flat price STD DADP price STD CPP price STD DADP price STD IBP price STD DLC price  Figure 7 presents energy prices. It is interesting to notice that IBP and DADP tariffs reduce the energy price in the middle of the day. The reduction occurs due to the presence of photovoltaic generation in the IMG. IBP and DADP DSMs incentivize customers to increase energy consumption when it is cheaper to generate electric energy.
The Γ DLC DSM curtails a percentage of the demand. Figure 8 shows the daily average of the curtailed values in a continuous line and the STD of the curtailed energy in a shaded area.

Curtailed demand [kW]
Average STD The stimulus introduced by DSM strategies modifies customers' consumption patterns. Using Equation (6) and the stimulus computed using Equations (15)- (26), it is possible to compute the demand response. Figure 9 shows the demands after the application of DSM. The lines represent daily averages of the electrical demand, and shaded area represents the STDs.  It is interesting to note in Figure 7 that the IBP rate tends to be similar to the DADP rate. Therefore, it produces similar effects over electrical demand (see Figure 9). The lack of hourly restrictions on the appearance of the incentive of the IBP tariff causes this to occur. However, the design of hourly restrictions will rely on the experience of the IMG planner, which may ultimately lead to sub-optimal results.

Sizing Analysis
The variations in the customers' consumption patterns modify the IMG sizing. Figure 10 presents the variations in the sizing of the Diesel Generator, the photovoltaic system, and the BESS for the five DSMs. On the one side, Figure 10 shows that ToU-and IBP-based DSMs require less installed capacity than the other alternatives. On the other side, Figure 10 shows that DLC and CPP DSMs do not considerably reduce the energy sources' installed capacities. However, reductions in installed capacities do not necessarily mean that one DSM is better than others. The following sections contribute with different analyses to determine which of the DSMs can be more suitable for IMG applications.

Economic Analysis
The DSM introduction in the IMG planning modifies total costs, investors' profits, customers' payments, total delivered energy, and LCOE, among others. Equations (32)-(36) present how to compute these values, and Figure 11 shows the results for the five DSM strategies and the base case.

Assessment of the Impact of Forecast Errors
In the operational stage of the IMG, the proposed formulation computes the DSM stimulus using day-ahead load forecasts. Instead of using a particular method to perform the forecasts, the approach adds Gaussian noise to the real demand to build the forecasted demand, as is stated by Equations (37) and (38). This approach allows measurement of the impact of forecast errors over the final results in the third stage (after knowing the real values of the load).
Thus, this section presents a sensitivity analysis of the impact of forecast errors. By computing the simulations again, considering forecast errors of 0%, 5%, 10%, and 15%, this approach computes forecast errors using the Mean Absolute Percentage Error. Table 4 relates the percentage of error with the STD used in Equation (37). It is significant to notice that the reported errors correspond to the average error for all the forecasts of all the simulated scenarios. In the 0% error case, the forecasted demand values are equal to the real values d F h = d R h . The case study found that the methodology is unable to compute the day-ahead stimulus of the DSMs when the forecast errors are near to 20% (σ 2 = 0.2512). Figure 12 shows that the impact of the forecast errors in the total costs, the delivered energy, the investors' profits, the customers' payments, and the LCOE is not significant. The variation between the case with perfect forecasts and 15% error in the forecasts is less than 1%. The DADP tariff presents the highest variation in profits and payments of the customers, which drop 1% as compared to the case where the forecast errors are zero.

Assessment of the Relation between the First and Third Optimization Levels
This article presents the design of a methodology to compute the effects of five different DSMs over the sizing of IMGs. However, in order to calculate the energy sources' capacities, only the first optimization level of the proposed methodology is required. The second and the third optimization level formulations evaluate the performance of the IMG once it is in operation. Figure 13 reveals the percentage variations between the results from the first and third optimization levels for the five DSMs and the base case.
The first level of the proposed methodology uses a scenario approach built upon historical data and considers an optimization horizon of one year. The second and third levels use a scenario approach built upon forecasts to predict DSMs and consider a rolling horizon with an optimization horizon of one day over a year. Figure 13 presents the comparison between the average results from the first and third levels when the error in the forecasts is 10%. The extra costs, payments, and LCOE, as well as the reductions in profits and payments, are the result of the change of the optimization horizons and the use of historical instead of forecast data. Planners can also compute percentage variations between the first and third levels for different forecast errors and can utilize trends in percentage variations of each of the values to avoid executing the second and third levels of the methodology. Just by executing the first level and considering the percentages' variations in their calculations will be enough to estimate the total costs of the IMG project.  Figure 13. Percentage differences between the results of the first level and the third level for the five DSMs and the base case.

Performance Comparison of the Five DSMs
The five DSMs have different performance in different aspects. Equation (39) is adopted to measure the performance of each of the DSMs. Figure 14 shows that DADP and IBP tariffs perform better than the other DSMs. However, these rates require announcing energy prices one day in advance, so customers reorganize their consumption daily. In the context of IMG, hourly variations of the tariffs might not be the best option in some scenarios. In those scenarios, a ToU tariff or CPP tariff can give a satisfying solution as well.

Conclusions
The present work proposes a methodology to design and evaluate five DSMs in the planning and operation of IMGs. The methodology allows determination of the optimal size, optimal energy dispatch strategy, and optimal stimulus for the DSMs using a Disciplined Convex Stochastic Programming approach. The work designs and evaluates the effects of the five DSMs using one case study as a test-bench, which makes this work the first attempt to do so in the literature known by the authors.
The proposed methodology can help policymakers design proper regulations for IMG projects that consider the social conditions of customers and private investors. Additionally, the methodology can be useful for IMG planners or entrepreneurs that want to build profitable business models providing energy to isolated communities. In this regard, the methodology allows policymakers to: • Compute the effects of applying one of the five DSMs over the total costs of IMG projects in the planning phase.

•
Control the revenue of private investors or entrepreneurs to prevent excessive profits.

•
Minimize the total amount of subsidies paid by the government for IMG projects.

•
Compute the effects over the sizing and the total costs of IMG projects for different values of customer elasticities.
Additionally, the methodology allows IMG planners or entrepreneurs to: • Compute the expected expenses and revenues of an IMG project considering any of the five DSMs.

•
Compute the sizing of the energy sources considering any of the five DSMs. • Consider the effects of using different combinations of energy sources to supply the electrical demand.

•
Obtain the optimal day-ahead energy dispatch strategy for the microgrid considering any of the five DSMs.
The methodology can provide the benefits mentioned above to its users if the assumptions that it was built upon are fulfilled. In this regard, by sharpening the assumptions, the methodology will adapt better to the conditions of IMG projects. Considering more energy sources, sophisticated models of customer elasticities, and demand response models adapted to local conditions, among others, will improve the methodology as well.
Finally, it is essential to highlight the technical characteristic of the present study, which aims to inform planners and policymakers about the benefits of applying DSMs in the planning of IMGs. However, policymakers should perform comprehensive social and behavioral studies to evaluate the potential of acceptance of price-based or direct load curtailment DSMs in the context of IMGs. Acknowledgments: The authors wish to thank the Department of Electrical, Electronics, and Telecommunications Engineering (Escuela de Ingenierías Eléctrica, Electrónica y de Telecomunicaciones) of the Vice-Rectorate for Research and Extension (Vicerrectoría de Investigación y Extensión) from the Universidad Industrial de Santander (Project 8593).

Conflicts of Interest:
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Abbreviations
The following abbreviations are used in this manuscript: