Multi-Objective Optimal Capacity Planning for 100% Renewable Energy-Based Microgrid Incorporating Cost of Demand-Side Flexibility Management

: The need for energy and environmental sustainability has spurred investments in renewable energy technologies worldwide. However, the ﬂexibility needs of the power system have increased due to the intermittent nature of the energy sources. This paper investigates the prospects of interlinking short-term ﬂexibility value into long-term capacity planning towards achieving a microgrid with a high renewable energy fraction. Demand Response Programs (DRP) based on critical peak and time-ahead dynamic pricing are compared for effective demand-side ﬂexibility management. The system components include PV, wind, and energy storages (ESS), and several optimal component-sizing scenarios are evaluated and compared using two different ESSs without and with the inclusion of DRP. To achieve this, a multi-objective problem which involves the simultaneous minimization of the loss of power supply probability (LPSP) index and total life-cycle costs is solved under each scenario to investigate the most cost-effective microgrid planning approach. The time-ahead resource forecast for DRP was implemented using the scikit-learn package in Python, and the optimization problems are solved using the Multi-Objective Particle Swarm Optimization (MOPSO) algorithm in MATLAB R (cid:13) . From the results, the inclusion of forecast-based DRP and PHES resulted in signiﬁcant investment cost savings due to reduced system component sizing.


Introduction
The quest for provision of affordable, clean, and reliable electricity supply is the key aspiration of many nations globally. These aspirations are portrayed by the commitment of most countries to the formulation and chartering of strategic policies that are targeted towards attaining 100% green energy transition in the near future [1]. Many countries have embarked on different sustainable energy pathways; for example Germany [2] and Sweden [3] aims to attain 100% renewable energy by 2050 while Hawaii in the United States has set 2045 as a target [4]. Several African countries have also taken significant steps and shown visible commitment towards massive green energy uptakes mainly by wind and solar energy. Countries such as Kenya [5], Ghana [6], Mauritius [7], Nigeria [8], Egypt, and South Africa [9] are currently making efforts in the integration of renewable energy technologies on both small and large scale. However, the incorporation of variable renewable energy resources (VREs) such as wind and solar energy increases the flexibility needs of a power system. Hence, to achieve an acceptable level of power system operation reliability, dynamic and vibrant control strategies need to be devised to balance the demand and supply using efficient flexibility mechanism [10]. Flexibility providers are, usually, adaptable resources needed to address the short-term mismatches between the instantaneous generated power and the load demand [11].
Most of the classical power system planning strategies comprises of segregated optimization models for power system design. These models generally comprise of three features which are component sizing to determine the optimal capacity configuration, unit commitment model to determine the optimal operation strategy, and electricity market strategies to evaluate optimal point-to-point energy transactions [12]. However, the segregated approach is not sufficient for achieving an optimally reliable system design; this is because the operational efficiency of power system relies highly on the time-based dispatchability and controllability of the system generating resources. Furthermore, with the increasing penetration of VREs, the controllability and dispatchability of power system generation sources becomes more complex. Hence, the planning for the transition towards a high VREs-based energy system requires an integrated system planning that involves the cost of component sizing and system flexibility [13]. A comprehensive investigation of the economic viability of different kinds of flexibility providers available for power systems is discussed in [14]. The cost of flexibility is defined as the additional cost required to integrate additional adaptable resources to address the intermittency of VREs integration. There are many sources of flexibility provider options; these includes system interconnection, demand-side management, supply-side management, storage technologies, etc. [15]. From the generation planning perspective, flexibility is investigated based on the ramping capability of the generators, the minimum possible attainable generation, increased cycles of shutdowns and startups for hybrid configuration as outlined in [16].
The idea of hybrid-energy system has also shown some significant growing interest as a valuable and efficient flexibility provider towards 100% VREs generation as shown in much recent research. The authors in [14] performed and provided a comprehensive framework for techno-economic flexibility analysis based on MILP optimization model by combining complimentary distribution generation alternatives such as thermal storage, heat pump, and cogeneration. The importance of the appropriate selection of complementary generating technologies coupled with energy storage system (ESS), with an improved optimal operation strategy, as a cost-effective path towards ensuring power system flexibility is highlighted in [17]. Electricity storage has played a valuable and significant central role in power system in many aspects [18]. Energy storage has the advantage to time-shift the electrical energy supply thus it acts as an ideal mechanism for moderating the consequences of fluctuating output of VREs on the power system. There are many well-known types of ESS in many works of literature varying in terms of technical and economic specification as summarized in [19]. Many studies have evaluated and demonstrated the cost-benefits of appropriate selection and application of different ESS technologies incorporation into the power system planning. The common ESS ranges from pumped hydro [20], hydrogen storage [21], BESS [22], compressed air energy storage, etc. [23]. The inclusion of demand-side management into optimal component sizing that involves energy storage (ESS) facilities is proposed in [24]. The final outcomes show that using the demand-side management (DSM) increases the system flexibility and offers an economical planning option with reduced ESS capacity requirement.
There are two main categories of end-user electrical demand namely the flexible load demand (FDRs) and inflexible/static load demand. The flexible load demand (FDR) are assumed to be those appliances whose time of use can be transferred from one period to another. FDRs include heat pump, room heater, washing machines, etc. They are also referred to as the shiftable appliances because their usage can be delayed during the period of peak demand or shortage of electricity supply and activated later during the period of over-generation. Non-shiftable load demands, on the other hand, are appliances that are static in terms of the time of use, they have a fixed time of period as to when to use, such as illumination loads. DSM has recently received heightened attention in terms of flexibility provision capability using flexible demand resources (FDRs) to achieve the controllability of the customer load demand pattern [25]. In general, the FDRs provide allowances and capacity for time-shifting in terms of their energy requirements. A proper schedule of the FDRs can guarantee mitigation of the gap that exists between demand and system generation for power systems with very high renewable energy fraction as addressed in [26]. A demand-side flexibility approach using the controllability of FDRs has been developed with a detailed implementation framework for commercial and residential smart building in [27]. Demand response program (DRP) is a subset of DSM designed to influences the consumer's behaviors in terms of the time of usage of the FDR through motivations such as incentive payments and lucrative electricity prices to improve the overall system efficiency [28]. The concepts of DRP have been adequately covered in the literature with much focus on optimizing the electricity market design. The commonly featured types of DRPs found in the literature includes and not limited to; real-time pricing, day-ahead pricing, time of use, interrupted curtailable, direct load control, critical peak pricing, etc. [29]. Successful implementation of DRP should take into account the current and the forecasted future power system status to fully exploit the market flexibility [30] and captures the VREs generation uncertainties [31,32].
However, an accurate and reliable VREs output forecasting can serve as a core and vital component of energy management systems (EMS) implementation [33]. The role of forecasting also has significant value in the implementation of pricing schemes in the power markets to decrease the rate of market volatility [34]. Hence, power forecasting plays a pivotal role in flexibility planning for integrating and addressing the uncertainty of the VREs in hybrid power systems. Accurate power forecasting provides critical information of the anticipated status (power shortages and surplus) of the power system ahead of time before the actual occurrence. Hence, a good foresight of the time-ahead generation profile provides an opportunity to plan for future uncertainties adequately and cost-effectively. The ability of a system to meet and handle the growing ramping requirements and volatile residual demand is a significant concern of system operators as the share of wind and solar increases. The economic benefit of accurate solar forecasting in minimizing the generation cost, as well as managing power curtailment was investigated and illustrated by Martinez-Anido et al. [32]. A detailed approach has been adopted for wind power forecast application in [35] and in [36] considering several power market scenarios.

Research Motivation
Various research has been conducted on optimum component sizing using various optimization techniques to evaluate a cost-effective hybrid microgrid configuration such as PV/biodiesel/BESS using simulated annealing [37], Supercapacitors/BESS/WT/Fuel using Non-dominated Sorted Genetic Algorithm [6], diesel/PV/WT using multi-objective self-adaptive differential evolution algorithm [38], PV/WT/BESS using cuckoo search algorithm [39], MOPSO [40], GA-PSO and MOPSO [41], and more. However, it is observed from the research trends in the literature that in order to ascertain the maximum techno-economic benefits for any microgrid configuration and investment, the flexibility requirements of the system must be factored into its design, i.e., reliability based on adequate system flexibility provision must be prioritized alongside the planning and capacity sizing. Hence, in this study, a multi-objective optimal planning for an isolated microgrid that introduces the cost of flexibility management using ESS and DRP is investigated. The multi-objective design problem is formulated and solved using the Multi-Objective Particle Swarm Optimization (MOPSO) algorithm in MATLAB environment.

Research Contribution
In view of the above, the main contribution of this work is to introduce a suitable cost-effective framework for incorporating short-term flexibility management requirements into the long-term planning of renewable energy-based microgrid. The total cost of investment and flexibility management, and the supply reliability requirements are investigated and compared under different system design scenarios using the multi-objective optimization approach. The effectiveness of ensembled data-driven renewable energy generation forecasting using the Gradient Boosted regression trees (GBRT) techniques for DSM/DRP flexibility planning and efficient coordination of FDRs is analyzed and compared with the critical peak pricing DRP alternative. The economic advantage of using PHES, compared to BESS, in microgrid applications that requires high renewable energy fraction has been demonstrated through simulation using the data for a real Kenyan microgrid case study.
The rest of the paper is organized as follows; Section 2 presents the methodology and system modeling, Section 3 provides an overview of the FDR, and the techniques of each DRP is described. The optimization problems are formulated in Section 4 while Section 5 provided the details of the case study and simulation parameters, simulation results are outlined and discussed in Section 6 and finally, Section 7 provides the conclusion of the work. Figure 1 shows the proposed microgrid system infrastructure; which consist of the WT, PV, PHES, and AC loads connected through an AC bus. The energy management system is also included as the control center for the microgrid. The mathematical models that describe the behavior of each system component and the energy management strategies deployed in this study are discussed below.

Wind Turbine
The output power of a wind generator WT P (t) is a function of wind speed and can be calculated using Equation (1) [42]: where u ci , u rtd , u and u ou are the cut-in speed, nominal speed, instantaneous wind speed at hub height and cut-out wind speed for the wind turbine, respectively. WT rtd p is the rated power output of the wind turbine.

PV System
The generated output power of the PV system (PV p (t)) is significantly determined by the solar irradiances incident on the PV surface and temperature. The PV output power as a function of input variables is given by (2) [43]: where f pv , PV rtd p , G(t) is the power reduction factor, installed capacity of the PV in kW and the incident solar irradiance, respectively. θ t , G std , t std is the temperature coefficient, solar irradiance, and temperature under the standard test condition.

Energy Storage System Model
Whenever the combined output power of WT and PV generation surpasses the capacity of load demand, the ESS transitions into the charging state. The amount of energy stored at any given time t is primarily determined by the difference between the sum of the total PV and WT generation, and the load demand.

Battery Energy Storage System (BESS)
The amount of discharging and charging power drawn or sent to the battery energy storage system, respectively, is subject to the previous state of charge (SOC) as well as the ESS system constraints. The SOC at any given t is determined by the following equation.
where SOC(t − 1) and SOC(t) and is the BESS state of charge for the previous and current period in kWh, respectively. L D (t) is the load demand, β c denotes the power converters efficiency, dr and β ch is the hourly self-discharge rate and BESS charging efficiency respectively. Whenever the total generation cannot meet the load demand, BESS shifts into the discharging mode. Consequently, the current state of charge at any given time t is given by: where β ds is the discharging efficiency. The energy storage level (SOC) must be constrained within the upper SOC max and the lower SOC min bounds of the BESS.

Pumped Heat Energy Storage (PHES)
The PHES stores electricity as sensible heat in two thermal storage system; a hot high pressure and temperature tank (+500 • C, 12 bars pressure) and a cold low pressure and temperature tank (−160 • C, 1 Bar). It also consists of a two compressor/expander pair, argon as a working fluid and it uses gravel as the storage medium. The operation strategy is analogous to pumped hydro storage but rather than pumping water, heat pumping is used to create temperature difference. Theory of operation and development is adequately covered in [44][45][46].  The energy stored in a PHES depends on the temperature differences between the two thermal storage system. The energy stored ESS phes (t) in the reservoirs per unit volume is the difference between the internal energies of the storage medium in the hot and cold stores. The internal energies of the storage medium are the function of the mass (M r ) and specific heat densities of the storage medium (SH r ). The energy stored can be determined by the temperature difference between the hot and cold store [47] as illustrated below: The power output and input P phes (t) of the PHES per unit volume (for charging and discharging instance) is determined by the mass (Mg) and the specific heat of the argon gas (SHg), and the temperature difference [48] as follows: where (T 1 (t), T 2 (t)) are the top and (T 3 (t), T 4 (t)) are the bottom section temperature of the hot tank and cold tank respectively. Figure 3 shows the flowchart for the integrated system planning method considered in this work. The framework combines the optimal ESS scheduling and optimal DRP implementations. The FDRs play significant roles in the flexibility management of the system whenever they are appropriately activated to minimize the mismatch between generation and demand. The DSM approach that is employed in this study for the DRPs is based on the optimal scheduling of appropriate FDRs in the microgrid as explained below. The net capacity of the shiftable load demand (FDR), throughout the system scheduling period, is assumed to have a maximum range of up to 10% up (FDR max ) and down (FDR min ) of the initial total FDR load demand value [49].

Price Elasticity of Demand and Load Modeling
A change in price of a service will have an impact on the amount of quantity demanded. For instance, a change in the price of electricity (∂E pr std (i)) in the ith period will result in a change of the load demand (∂L D (j)) in the jth period either by increasing or decreasing the load demand. Thus, a change in electricity price during the single period ith affects the load demand during all the periods (T). The price elasticity of demand (PE φ(i,i) ) gives a measure of the responsiveness at which the end-user time-shift their energy consumption patterns with respect to change in electricity as shown below: The price elasticity of demand entails self and cross-elasticity; the self-elasticity defines the sensitivity of load demand with respect to price within the same pricing interval (single period elasticity) and usually has a negative value implying some proportion of the load cannot be transferred from one period to another. On the other hand, cross-elasticity (PE φ(i,j) ) defines the load demand sensitivity of the (ith) pricing period in response to the electricity price variation in the (jth) pricing period (multi-period elasticity) and usually has positive value implying some proportion of the load demand is shiftable to another period. The cross-elasticity of load demand is given by [50];

Critical Peak Pricing (CPP) Demand Response Program
CPP is a time-based DRP that divide electricity usage time into periods and presents the fixed electricity prices for each period in advance; peak and off-peak periods. It is usually employed to increase system energy efficiency and alleviate stress on the power system especially when the load demand is likely to surpass the generation capacity. It commonly enforces a very high electricity price during system peak load demand periods and for some specific time periods in order to achieve load reduction during these periods, and retains a flat pricing scheme or a lower electricity price during off-peak periods [51]. The electricity customer responds by shifting load demand from one time period to another due to the enforced pricing scheme. The ultimate customer's demand profile after implementation of CPP DRP is expressed as [41,52]: where E pr std (i) is the standard Kenyan electricity price before CPP DRP implementation, E pr cpp (i), E pr cpp (j) is the electricity price for current ith period and the jth period after implementation of CPP DRP, pd(i) and pd(j) are the incentives and ps(i) and ps(j) are penalties enforced for non-compliance's of DRP.

Time-Ahead Dynamic Pricing (TADP) Demand Response Program
The cost of generation and the corresponding cost of electricity are highly affected by the shortages and surplus of power generated in the power system. Short periods of mismatch in load demand and generation might necessitate an over-sizing or additional capacity in the ESS that might not be necessary or efficiently used during normal operating times. A remedy to this challenge is to offer motivating electricity prices to influence a time shift in FDRs by the end user. A longer pricing horizon ahead of time can guarantee end-user participation in the DRP. Thus, in TADP DRP, time-ahead electricity pricing profile formulated as a function of the mismatch in the forecasted demand and generated power is relayed to the end user an hour (one period) in advance.

Time-Ahead Dynamic Pricing Model
The electricity price for the next hour (E pr TADP (t + 1)) is determined based on the difference between forecasted total generation output power from renewable energy sources (PV and WT) and the load demandL D (t + 1) using the following equation: wherePV p (t + 1) andŴT p (t + 1) represent the forecasted generation output power from the PV and WT, respectively. E pr std (t + 1) is the initial (standard) Kenyan electricity price initially present for hour t + 1 before TADP DRP implementation. E pr TADP (t + 1) is the next hour electricity price after the implementation of TADP DRP.

Time-Ahead Dynamic Pricing Demand Response Program Load Modeling
The electricity price determined one hour ahead of time for a specific period is the actual price that would be adopted for that period. Based on the electricity price relayed in advance, the end-consumers are either motivated/discouraged to shift their FDRs. The final economic load model after the TADP DRP is implemented is expressed as: where E pr std (i) is the current (ith period) Kenyan electricity price before TADP DRP implementation.

Gradient Boosted Regression Trees (GBRT) Model for Time-Ahead Forecast of Generation
In this work, the forecasting tasks are treated as regression problems and machine learning regression algorithms on scikit-learn package in Python are adopted to build the models using the Gradient boosted regression trees (GBRT) algorithm. The GBRT algorithm has a superior advantage of not requiring complex data pre-processing of dimension transformations or reduction and does not suffer any loss of input variable interpretation [53]. The significant feature of the accurate implementation of the GBRT algorithm is the parameter α gbr called the learning rates. The learning rate is a scaling parameter that determines the individual contribution of each decision tree to the final ensemble model. The accuracy of the model is continuously improved by fitting the residual decision iteratively until the desired model is obtained for the best learning rate. Algorithm 1 illustrates the GBRT pseudo code algorithm. and establish the terminal leaves for J = 1...j K ; determine the output of each leaves that minimizes;

Optimal Design Problem Formulation
The multi-objective optimal design model is evaluated in terms of economic and reliability criteria as presented in the objective functions defined below:

Economic Criteria: Total Life-Cycle Cost (TPC)
The objective function of the economic criterion is formulated as a cost minimization problem of the net present value of the total life-cycle costs (TPC) of all system components alongside the implementation of the flexibility requirements under different system scenarios. The decision variable of the optimization problem is the capacity of the WT (C WT ), PV (C PV ) and ESS (C ESS ).
where z indexes the z th component and C z is the decision variables that represent the optimum component capacities of each of the system components (PV, ESS, and WT). The TPC components are the capital costs (CI z ), yearly operation and maintenance costs (O&M z ), replacement costs (RP z ) and the salvage value RV z , N is the project lifetime, n is the time step in the project life, i.e., a year and r is the discount rate. The system components have a yearly operation and maintenances cost over the project lifetime.

Reliability Criteria: Loss of Power Supply Probability (LPSP)
The second objective considers the loss of power supply probability as the system reliability criteria. LPSP reliability index measures and ascertains the quality and reliability performance of the power system design under the different scenarios considered in this study. LPSP is defined as the ratio of the sum of all energy deficits (LPS) to the total power demand. Thus, LPSP can be evaluated by using the following expression: where LPSP value ranges between zero and one; a value of 0 for LPSP implies that the load demand will always be met or satisfied, and this is the most desired and preferred performance. The following system DRP constraints are considered during the optimization procedure, alongside the other system component constraints that are mentioned at each design stage.

Overview of the Optimization Tool: Multi-Objective Particle Swarm Optimization
PSO is a population-based approach for solving discrete and continuous optimizations problem that stemmed from and mimic the navigation behavior of swarms of bees, flocks of birds, and schools of fish. To obtain the optimal value of the objective function at each search, two different solution points are obtained which are called the local best, Pbest i = (p i1 , p i2 , ..., p id ) and the global best, is Pbest g = gbest = (p g1 , p g2 , ..., p gd ); and the positions of the particles for the next objective function evaluation is estimated as given below: iter is the iteration count, iter max is the total iterations. w i , w f are the minimum and maximum range of the inertia weight. The multi-objective PSO approach adopted in this work is described [54]. The repository particles guides the search within the efficient, non-inferior and admissible pareto front by sorting out the non-dominated solutions. The exploratory capacity of the algorithm is strengthened by a special mutation operator just like in NSGA II algorithm as explained below. If f ( x) consists of n objective functions each with m decision variables, then the multi-objective problem can be defined as finding the vector g and h are sets of inequality and equality constraints, respectively. A point x * ∈ χ is pareto optimal if for every x ∈ χ and I = 1, 2, ..., k either: or at least there is one i ∈ I such that

Research Case Study and Simulation Parameters
The proposed energy system planning and management approach are investigated on an undeserved Marsabit county isolated microgrid in Kenya, which is currently served by conventional diesel-based generators. The goal of this work is to investigate the best flexibility management incorporated hybrid VRE energy supply combination that will completely replace the existing diesel generators considering the cost and reliability criteria that are described above. The hourly meteorological data of the locality (2.3369 • N, 37.9904 • E) was obtained from online sources [55,56] for 2015 to 2018. The meteorological data set consists of wind speed, wind direction, air pressure, relative humidity, solar irradiance, and the temperature variables. The economic and technical parameters were obtained from [57] through desk research and consultation with energy sector employees and policymakers in the region. Table 1 shows the details of simulation parameters and Table 2 shows the considered self and cross-price elasticity of demand, which is adopted from [52] modified to fit the Kenyan case. The price elasticity of demand entails self and cross-elasticity; the self-elasticity defines the sensitivity of demand with respect to price within the same pricing interval while cross-elasticity (PE φ(i,j) ) define the load demand sensitivity of the (ith) pricing period in response to the electricity price variation in the (jth) pricing period. The cross-elasticity of demand is given by [50];  Table 2. DRP self and cross-price elasticities of demand [49,50,52].

Off-Peak Period Peak Period
Off-peak period −0.1 0.016 Peak period 0.016 −0.1 The Kenyan tariff structure of 2018 was obtained from [58,59]. The current electricity rate of 15.80 US Cents per kWh for ordinary domestic consumers was considered to be the flat rate E pr std . For this work, the CPP DRP pricing scheme was considered to be 20.00 US Cents per kWh for peak period from 7:00 p.m. to 10:00 p.m. while the rest of the day adopted a flat pricing of 15.80 US Cents per kWh. TADP DRP implemented a time-ahead hourly variable pricing scheme with a maximum and minimum electricity price of 20.00 US Cents per kWh and 10.00 US cents per kWh, respectively.
PHES has no geographical limitations [60] and have been found to be a viable ESS technology option for both large and small-scale energy management applications. Its prospects in terms of cost-effectiveness and flexibility provision has also been verified in [48], thus, it has been determined to be one of the most suitable ESS options for application in isolated places such as the Kenyan microgrid case under study. PHES stores electricity as sensible heat in thermally insulated and closed-looped thermal storage systems which ensures that the system is isolated; hence, based on the design aspects outlined in [47], there is a guarantee that the model is feasible for deployment for our case study. The analysis of a proposed commercial PHES design with a maximum capacity of 16 MWh as detailed in [45,61] has been adopted as the benchmark for many studies in the literature; thus, the system technical and economic specifications are used in our work for the Kenyan microgrid under study.

Simulation Results and Discussion
The simulation results are presented for three cases based on optimal capacity planning and flexible operation feasibility using BESS and PHES, with and without DR. The optimal size of system components is determined under each case at minimum investment costs and maximum supply reliability (minimum LPSP) while satisfying the system operational and flexibility requirements. The results of the considered three case simulation scenarios are outlined and discussed below:  Figure 4a,b shows the trade-off Pareto front plots for economic and reliability criteria with BESS and PHES, respectively, under case 1. From Figure 4, as expected, the system reliability condition improves (LPSP value decreases) as the total cost increases and vice visa. Hence, the cost-benefit relationship at different LPSP values is analyzed and discussed using the investment cost-savings approach. Table 3 summarizes the details of the cost-benefit analysis for case 1. The optimal selected points are derived after multiples execution of the optimization program for LPSP values in the range of 0% to 15%. 6 6.5 7 7.5 8 8. 5 9 TPC (US $)  A comparison of the two systems based on the ESS technology at maximum reliability condition i.e., LPSP = 0%; it can be seen that the choice of PHES instead of BESS results in a total investment cost reduction of about 34.28% from US $ 1.38 × 10 7 to the US $ 9.06 × 10 6 . This a significant cost saving in the microgrid planning. Hence, PHES has been shown more economical compared to BESS.

Case 2: BESS versus PHES with CPP DRP
In this case, the benefit of CPP DRP on capacity sizing optimization problem for both BESS and PHES-based microgrid is investigated, and pareto fronts plotted. Figure 5a,b shows the Pareto front plots with CPP DRP considering BESS and PHES, respectively. For both cases, it can be observed from the pareto plots that an increase in the LPSP value, the TPC decreases, this is due to the fact that the reliability index (LPSP) and planning cost (TPC) are conflicting objective. Table 4 summarizes the cost-benefits analysis for case 2 which involves the economic effects of critical peak pricing (CPP) DRP for the BESS and PHES-based microgrid configuration.  For the comparative analysis of the two systems configurations at LPSP = 0% (maximum reliability) with the consideration CPP DRP; the selection of PHES as an ESS alternative to BESS in optimum capacity resulted in 34.22% reduction in the total investment costs. This significant cost saving signifies that PHES-based configuration is more economical and preferred investment option compared to BESS-based microgrid.

Case 3: BESS versus PHES with TADP DRP
In this case, the prospects of TADP DRP in optimum component-sizing problem has been investigated. The renewable energy generation forecasting is a subset feature of the TADP DRP implementation. Hence, the GBRT prediction results for wind speed, solar irradiance and the consequent WT and PV powers are validated using error metrics (MAE, RSME and r 2 ) in order to determine the suitable forecasting condition based on the learning rates α gbr . The total data set contained 17,520 data points with an hourly resolution; from which 75% of the data are adopted for training, and 25% are adopted for testing. Table 5 summarizes the forecasting results based on MAE, RSME and r 2 for the GBRT forecasting model under three α gbr values i.e., α gbr = 0.1, 0.3, 0.5. As it can be noticed, the chosen value of α gbr significantly affects the precision of the GBRT forecasting model. The best wind speed and wind power forecast results are realized when the α gbr value chosen equals 0.1. The least error values indicated by MAE and RMSE of 0.22 (m/s) and 0.27 (m/s) for wind speed prediction and 35.03 kW and 47.98 kW for wind power forecast respectively confirms the consequences of the α gbr value chosen. The results accuracy are further validated using the r 2 metric; the highest value of r 2 = 0.96 further establishes that the GBRT at α gbr = 0.1 is an appropriate model for wind speed and wind power forecasting. Figure 6. shows a comparison of the actual wind speed versus the predicted wind speed with one-hour-ahead rolling forecasting horizon using the GBRT model when α gbr is set to 0.1 (for the best α gbr value).  Also, for solar irradiance and PV power prediction, the best results are obtained when the α gbr parameter is set to 0.1. The minimum error values indicated by MAE and RMSE of 15.36 (W/m 2 ) and 29.62 (W/m 2 ) for solar irradiance prediction and 17.43 kW and 33.60 kW for PV power forecast, respectively, validate the parameter selection. Also, the highest r 2 metric of 0.99 shows the goodness of fit and suitability of the model selection as being appropriate. Figure 7 shows a comparison of the actual versus the predicted solar irradiances with one-hour-ahead rolling forecasting horizon using the GRBT model when α gbr is set to 0.1 (for the best α gbr value).   Table 6 summarizes the cost-benefits analysis for the BESS and PHES-based microgrid configuration.  According to the results of optimal capacity sizing considering TADP DRP at LPSP=0%, it can be noted that adoption PHES-based configuration will results in about 30.23% investment costs reduction compared to the BESS-based. Hence, PHES-based microgrid is the most cost-effective microgrid configuration compared to the BESS-based microgrid design. For all the scenarios (case 1-3) investigated, it is seen that PHES gives the lowest investment cost on ESS compared to BESS. Thus, for a cost-effective long-term investment, it can be deduced that the selection of the PHES-based microgrid has a better economic prospect compared to BESS-based configuration.

Techno-Economic Comparison for Each ESS Type Based on DRP Options at Maximum System Reliability (LPSP = 0%)
In this section, different microgrid configurations based on the DRP options are evaluated based on the net investment cost for different ESS types. The prospect of each configuration in the long-term microgrid planning with the possibility of high renewable energy fraction is reflected in the net investment cost under each system configuration. Figure 9a,b shows the pareto front plots comparison, without and with DRPs, for BESS and PHES-based microgrid design, respectively.  Table 7 summarizes the investment cost under each configuration and flexibility options. The reference cases are the ones without DRP consideration (case 1) and the cost implication of introducing different types of DRP for each ESS-type microgrid are duly analyzed in terms of percentage cost reduction. For the BESS-based microgrid, introducing CPP DRP results in a cost saving of 0.53% of the investment from US $ 1.38 × 10 7 (without DRP) to 1.37 × 10 7 ; this cost saving is as a result of 21.59% and 5.33% reduction in the PV and BESS component sizes, respectively. This is because CPP DRP decreased the load demand and consequentially, the BESS dependency during the peak demand periods. For the PHES-based microgrid, the introduction of CPP DRP results in 0.44% cost reduction from US $ 9.06 × 10 6 to US $ 9.02 × 10 6 . The cost-benefit is because of the 5.8% and 0.14% capacity size reduction of WT and PHES, respectively, and an increase of 7.4% PV capacity. For the two cases, It should be noted that there is a decrease in the investment costs as the CPP DRP shifts the FDR to off-peak from the peak period of the system and ensure a more flattened load profile and prevent sub-optimal capacity sizing.
The potential superiority of TADP DRP over CPP DRP for microgrid design for high renewable energy penetration can be seen in the cost-benefits illustrated in Table 7. The inclusion of the TADP DRP in the BESS-based system resulted in 7.2% cost saving in the total planning costs. The planning cost reduction is due to a decrease of 17.58% and 2.5% for BESS and WT respectively with a slight increase of 0.11% in PV component size. Similarly, this trend is noted for PHES-based system with a total cost reduction of 1.48% resulting from 3.98% and 8.69% decrease in PHES and WT capacities, respectively. However, this results in an increase PV capacity of about 9.36%. Figure 10 illustrates the role and impact of DRPs in minimizing the gap between total generated RES power and load demand profiles. The prospects of TADP DRP over CPP DRP to reduce the mismatch between the load and the RES generated power profiles has been vividly portrayed by significant optimum component size reduction and hence the TPC minimization to realize the techno-economic benefit of a microgrid. Therefore, for the two system and types of DRP investigated, it can be inferred that the application of TADP DRP is more investment-worthy compared to the CPP DRP. TADP DRP short-term flexibility option takes into account the varying generation profile of WT and PV from the forecasting results; thus, the reason for its robustness.

Conclusions
This paper investigated the prospects of interlinking the cost of short-term flexibility management of microgrid with the long-term optimal capacity planning models towards achieving a 100% green microgrid by using DRP and forecasting. The long-term capacity planning of energy systems involves the evaluation of the optimal size of each of the system component while the short-term flexibility options are implemented within the optimal energy management strategies. The DRPs are incorporated as flexibility options to minimize the gap between demand and supply, thus minimizing the overall system costs. The forecasting provides an outlook of anticipated generated power proper scheduling for the effective implementation of one of the DRPs employed in this work. The suggested methodology, in this work, seeks to provide a sustainable and cost-effective transformative approach towards achieving a 100% renewable energy generation for Marsabit county microgrid at a reduced cost of investment by cutting down on excessive sizing of system components. This can serve as a benchmark for other under-served isolated regions all over the world.
For the interlinked multi-objective optimization procedure, credible scenarios were investigated considering two ESS technology-based configurations without and with the inclusion of the DRP. DRPs were applied to provide the required operational flexibility that involves shifting the operation of the FDRs from one period to another to minimize the gap between the generation and demand profiles. The two objectives of the techno-economic optimization procedure are the minimization of loss of load probability (LPSP), which is the system reliability criterion and the minimization of the net present value of the investment costs, which is the economic criterion. The forecasting for TADP DRP implementation was performed using the GBRT algorithm on scikit-learn in Python due to its precision and less computational requirement compared to other algorithms, and the MOPSO was adopted for the optimization procedure. The LPSP is set as the standard for economic comparison under each scenario considered in this work. At LPSP = 0%, i.e., maximum system reliability, the potential benefit of TADP DRP outperformed the CPP DRP as reflected on the investment cost component. Also, for the ESS-type performance comparison, PHES was shown to be more cost-effective compared to BESS due to its low cost per kWh of storage capacity and its resultant economic effect on the whole system configuration.

Acknowledgments:
The authors wish to acknowledge the Japan international cooperation agency (JICA) for the support provided in the form of African business education (ABE) scholarship to the main author towards the success of this research work. The authors also wish to appreciate the effort of Hannington Gochi of REA, Kenya office for supplying the principal data needed for this project.

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