Optimal probabilistic scenario‐based operation and scheduling of prosumer microgrids considering uncertainties of renewable energy sources

Uncertainties of renewable energy sources (RESs) such as wind turbine (WT) and photovoltaic (PV) units are one of the considerable challenges of prosumer microgrids (PMGs) for the optimal day‐ahead operation. In this study, a new probabilistic scenario‐based method of optimal scheduling and operation of PMGs is developed. In this regard, different scenarios are generated using Monte Carlo Simulations (MCS). Furthermore, k‐means, k‐medoids, and differential evolution algorithms (DEA) are deployed to cluster the scenarios in the proposed method. A realistic commercial PMG in Iran is selected to apply the introduced method. The validity of the developed probabilistic optimization method for PMG operation is examined by comparing the results under various scenario reduction algorithms and MCS ones. The comparison of the obtained results and those of other existing deterministic methods highlights the advantages of the presented method. Furthermore, the sensitivity analyses are carried out to investigate the robustness of the developed method against the increase in the system uncertainty level. According to the test results, it is concluded that the k‐medoids algorithm has the best performance in comparison with the k‐means and the DEA‐based clustering under various conditions.


| INTRODUCTION
In recent years, global warming and energy security issues have attracted widespread attention, more significantly the governments. [1][2][3] Many efforts have been made to tranquillize the impacts of future problems due to the mentioned issues. [4][5][6] The deployment of renewable energy sources (RESs) is one of the key solutions, which have been regarded in many countries. [7][8][9] The proliferation of RESs has brought environmental and technical benefits as well as economic benefits. 10 RESs also have proved to be a reliable source of energy in today's electrical systems. 11,12 The implementation of energy storage systems (ESSs) such as battery storage systems (BSSs) and electric vehicles (EVs) have multiplied the positive effects of | 3943 FARAJI et Al.
RESs on nowadays energy and environmental concerns. [13][14][15] Prosumer microgrids (PMGs) as the users of RESs and ESSs are playing an essential role in today's energy systems. 16 Unlike conventional consumers, PMGs can produce and sell electricity. 17,18 Moreover, from the perspective of distribution network operators (DNOs), PMGs are active energy units, which are able to participate in daily electricity markets. 19,20 Several merits are also attributed to PMGs, such as energy market reforms and regulatory supports. 21 Despite the merits of RESs in the operation of PMGs, their uncertainty such as the stochastic output power of photovoltaics (PV) and wind turbine (WT)-distributed generation (DG) units has become a major issue in optimal operation of power systems. 22,23 RESs are the main components of each PMG. Fluctuations and unpredictability of these energy sources have challenged the optimal operation of PMGs in day-ahead energy markets. 24 As a result, ignoring this critical factor in the optimization problem would deviate the operation cost (OC) of PMGs from the realistic values. Therefore, it is essential to consider the uncertainty of RESs in scheduling and operation of PMGs to have realistic results.
Most of the previous studies focused on the deterministic analysis of PMGs. In, 25 optimal BSS scheduling was proposed for the PMG, which its objective function (OF) was defined based on the imported electricity from the utility grid. Moreover, the real-time corrective actions on BSS improved the battery system's lifetime. The effectiveness of the introduced method has been investigated through different case studies such as low power generation of PV DG unit. In another work, 26 researchers mainly focused on optimal scheduling of industrial AC PMGs in the presence of demand response programs (DRPs). Different DG units were utilized for supplying industrial loads, including PV and WT DG units, and BSS. Authors concluded that the proposed DRP reduces OC and loss of energy in the day-ahead operation of AC PMG. In, 27 the authors reported a multi-objective (MO) optimization problem for day-ahead emission and cost minimization of PMGs. The cost-based OF included different terms, such as the cost of electricity purchased from the utility grid, electricity generation cost, and the BSS degradation cost. The authors also implemented a typical DRP for shifting the load from the peak time to other periods. The reported DPR was developed to flatten the daily load profile, which resulted in the decrement of PMG's OC. In the literature review, researches did not consider uncertainties of RESs in their presented optimization problems, while most introduced methods of PMG's operation were developed based on deterministic studies. Therefore, much realistic results would be achieved if the uncertainties of RESs are involved.
There are other works in the literature, which have considered the uncertainty of RESs, demand load, and electricity price in the PMGs' day-ahead scheduling and operation. Vahid-Pakdel et al 28 introduced stochastic energy management of multi-energy PMGs. Uncertainties such as wind speed, load demand, and electricity price have been considered based on scenario generation method using Monte Carlo Simulation (MCS). However, the number of generated scenarios was limited to ten scenarios, and this might not result in realistic system OC because some other possibilities of uncertain parameters have not been considered for the day-ahead operation. Moreover, due to the limited number of scenarios, the authors did not develop any scenario reduction method for their stochastic model. In another work, 29 researchers suggested point estimate method (PEM) and robust optimization to consider uncertainties of output values of RESs and demand load by simulating different scenarios, respectively. The generated scenarios were used for PMG optimization, and results were compared with the deterministic ones. Finally, the authors stated that the proposed stochastic method decreased the OC and operation risks significantly. However, the authors did not present any methodology for scenario reduction, and all the generated scenarios were used to solve the stochastic model. In, 30 the two-stage stochastic model was reported for day-ahead scheduling of PMGs using MCS scenario generator module. The backward method was used to reduce the generated scenarios by MCS in. 30 According to the results, 10 000 scenarios were generated by MCS, and it was reduced to 10 individual scenarios using the backward method. Different case studies were held to compare the optimization results of deterministic and stochastic modeling of PMG day-ahead scheduling. They have concluded that the case with stochastic modeling has provided accuracy in scheduling and has decreased the PMG's OC. In, 31 the risk-constraint stochastic modeling was introduced for a typical PMG. Different uncertainties such as WT generation and electricity prices were considered as independent uncertainties and electric vehicles and demand load as correlated uncertainties. They have used MCS and roulette wheel selection (RWS) using the k-means clustering method to generate and reduce the scenarios.
As described, different methods have been introduced to consider various uncertainties in day-ahead scheduling of PMGs. However, there is a research gap in the investigation of the performance of different scenario reduction methods. In this paper, a new scenario-based method is proposed for PMGs' probabilistic optimal scheduling and operation. The MCS is used to produce the scenarios for uncertain parameters. To accelerate the calculations, reducing the number of simulated scenarios of uncertain subsystems is necessary. Therefore, different scenario reduction algorithms have been used in this paper. The clustering would reduce the computational burden of the proposed optimization problem. In this study, different scenario reduction methods such as classical and metaheuristic clustering algorithms are examined by comparative analyses. Furthermore, the sensitivity analysis is carried out to investigate the accuracy of the scenario-based 3944 | FARAJI et Al. methods of PMG's probabilistic optimal operation due to the changes in system uncertainties.
The most important contributions of this paper could be summarized as follows:

A new probabilistic scenario-based cost function for
PMGs' optimal operation and scheduling is proposed. 2. Different scenario reduction methods, for example, kmeans and k-medoids algorithms as classical clustering ones and differential evolution algorithm (DEA) as a metaheuristic one, are comparatively applied, which has not been approached in recent studies. 28 Figure 1 shows the architecture of the understudy PMG. The PMG can import and inject electricity from/to the utility grid and cooperate in the daily electricity market. 32 The energy management system (EMS) plays a significant role in the optimal operation of PMG. All historical data, such as electricity price, weather data, and load demand, are collected in the EMS database. EMS receives hourly information from the utility grid. It takes the optimal decision to minimize the system OC. The EMS controls all components and behaviors of PMG, such as BSS charge and discharge schedule.

| RESs' UNCERTAINT Y MODELING
The deployment of stochastic-based simulation methods like MCS is very popular and useful. [32][33][34] Although it is possible to study the uncertainties using the MCS accurately, the computations would be time-consuming. 35 This problem is intensified when it is necessary to solve the optimization problems. 36 Hence, the development of new fast methods to study the energy system uncertainties, particularly the analytical or scenario-based methods, has received a great deal of attention. In this paper, a new scenario-based probabilistic method is proposed for optimal operation of prosumers. The various scenarios are generated using the MCS. The number of different scenarios would be decreased by applying different scenario reduction methods. Afterward, the optimization problem based on the new scenario-based OF is solved using GAMS. Figure 2 shows an overview of the steps of considering the uncertainties of RESs based on generating scenarios and using clustering algorithms to reduce the number of scenarios. As can be seen, the probabilistic outputs of RESs are used for PMG day-ahead optimal operation.

| Scenario generation using MCS
A. PV output energy generation scenarios The PV DG output power is affected due to changes in solar irradiance. 37 The solar irradiance is normalized by dividing into the standard irradiance (G 0 ) according to (1), and the solar clearness (k t ) index is defined. 38 The Beta distribution is one of the most popular distributions for statistical modeling of the solar clearness index, [39][40][41] as shown in (2).
The Beta probability density function (PDF) parameters could be calculated using (3) and (4). 42,43 (1) The overall structure of the understudy PMG

F I G U R E 2
Flowchart of the scenario generation and scenario reduction in the proposed scenario-based optimization method for PMGs' operation and scheduling The solar clearness index is calculated.
The statistical data e.g., mean value, standard deviation, and variance of hourly wind speed is calculated.

Yes
The historical data of wind speed is collected.

Start
The historical data of solar irradiance is collected.
The statistical data e.g., mean value, standard deviation, and variance of hourly solar clearness index is calculated.
The Weibull scale and shape parameters of wind speed are calculated.
The Beta PDF parameters of solar clearness index are calculated.
The number of scenarios (N), which should be generated by using MCS, are specified.
The random variable corresponding to the wind speed is produced.
The t-th wind speed at the s-th scenario by using the MCS based on the inverse of CDF is generated.
The t-th output power of the WT unit at the s-th scenario is calculated.
The random variable corresponding to the solar clearness index is produced.
The t-th solar clearness index at the s-th scenario by using the MCS based on the inverse of CDF is generated.
The t-th output power of the PV unit at the s-th scenario is calculated.
The optimization problem of the PMG operation and scheduling is solved by GAMS by considering all the generated scenarios.
The obtained results is set to the reference result.
The number of reduced scenarios is selected.
The scenario reduction algorithm is applied to the simulated scenarios.
The optimization problem of the PMG operation and scheduling is solved by GAMS by considering the clustered scenarios.
The proposed scenario-based optimal operation of the PMG is validated by comparison of the test results and reference results. A random number is produced to simulate the hourly clearness index using the MCS. By applying the inverse of the corresponding cumulative density functions (CDFs), as shown in (5), the clearness index is generated. 44 The power generation of the PV unit could be determined according to (6)- (9). 45,46 The PV output energy generation depends on the ambient temperature and solar irradiance. 36,47,48

B. WT output energy generation scenarios
The WT DG units' output energy depends on the wind speed as an uncertain environment parameter. [49][50][51] The probability distribution of wind speed could be modeled based on the Weibull distribution, as presented in (10). [52][53][54] The Weibull distribution parameters could be estimated using (11) and (12). 55,56 The mathematical modeling of the Weibull CDF is presented in (13).
The inverse of the Weibull CDF is utilized to simulate the hourly wind speed, as shown in (14). 44,57 The WT output energy generation could be determined using (15). 49,58 There are other similar models with nonlinear functions for the wind speed between the cut-in and the rated wind speeds. 59,60 However, the accuracy of these models is not significantly different from that explained in (15).
As revealed by (15), when the wind speed is not between cutoff and cut-in speed, the WT DG unit does not generate power.
The WT output energy generation should be calculated as a portion of the rated power while the wind speed is higher than the cut-in speed, and it is not higher than the rated speed. Otherwise, the WT DG unit will work at its rated output power. 40

| Scenario reduction methods
In this research, the k-means, k-medoids, and DEA-based scenario reduction algorithms are used.

A. K-means clustering algorithm
Lloyd's clustering algorithm or k-means algorithm is a data-partitioning and iterative algorithm that is widely used for clustering analysis in data mining studies. 61,62 Generally, the k-means algorithm allocates m sample data to a particular k cluster, which are mainly determined by centroids. 63,64 Each cluster has its own probability of occurrence, which is defined by the algorithm. In the k-means algorithm, (16) is used for minimizing the squared error function or total intra-cluster variance.

B. K-medoids clustering algorithm
The k-medoids algorithm is a well-known clustering algorithm. [65][66][67] Some features of the k-medoids method are similar to those of the k-means algorithm. However, there are some differences between these two scenario reduction methods. In the k-means algorithm, the centers of clusters are not necessarily one of the points of input samples and are the average between the points in the cluster. However, in the k-medoids algorithm samples, points are chosen as centers (medoids) and could be utilized with arbitrary distances.
C. DEA-based clustering method In this paper, in addition to classic scenario reduction methods like the k-means and k-medoids algorithms, differential evolution algorithm (DEA)-based as a metaheuristic scenario The population is randomly initialized.
The population is evaluated using fitness function.
An offspring is created and their fitness is evaluated.
Is the fitness value of offspring better than parents?
Parents are replaced by offspring in the new population.
Is the stopping criterion satisfied?

End
The offspring is discarded in the new population. reduction algorithm is used. The DEA 10 is a populationbased search strategy very similar to standard evolutionary algorithms. The main difference is in the reproduction step where offspring is created from three parents using an arithmetic cross-over operator. The DEA is defined as floatingpoint representations of individuals. Differential evolution does not make use of a mutation operator that depends on some probability distribution function but introduces a new arithmetic operator which depends on the differences between randomly selected pairs of individuals. Indeed, the DEA as a self-organization optimization algorithm benefits from the group evolution. Introducing a modified differential variation model is one of the most advantages of the DEA, which could utilize the individual differences in the available population to create variant individuals. In comparison with other existing conventional evolutionary approaches, the unique evolutionary operation using the differential variation mode improves the DEA's performance. 68 The impacts of initial conditions are reduced because of population-based search approach in the DEA in comparison with the classical algorithms. The parallel search is another advantage of the DEA. Regardless of the initial conditions, the global minimum is achievable using the DEA with satisfying convergence. 69 Also, the implementation of the DEA is easy. 70 The 24-dimensional parameter vectors are initialized randomly, which are uniformly distributed. Afterward, an offspring x ′ j (t) should be adopted using three random individuals, as (17).
If the fitness value of the offspring is better than the parent, it is replaced by the parent. Otherwise, the current parent is assigned to the offspring, as shown in (18).
In Figure 3, the flowchart of solving the optimization problem by DEA is shown. More information on clustering based on the DEA algorithm is available in. 71 In the proposed DEA-based clustering algorithm, a distance matrix, as shown in (16), is defined to evaluate the fitness value. The clustering fitness function is calculated based on the distance of the simulated scenarios and the randomly generated clusters.

| Objective function
The proposed scenario-based OF is formulated, as shown in (19). In the first and second OF terms, the exchanged power with the utility grid and the hourly SOC changes of BSS are concerned, respectively. The second term should be concerned because abrupt changes in the SOC may result in BSS life cycle degradation.

| Optimization problem constraints
The proposed optimization problem should be solved subject to the system constraints. The power balance condition is the most important constraint, 72 which could be demonstrated as (20).

Hour WT DG unit output power [kW]
In addition, the imported or injected power to the utility grid is limited to lower and upper bounds, as described in (21).
The full charge/discharge of BSS is not recommended because it results in fast degradation of BSSs. 73 In this regard, the following constraints (22 and 23) are considered in the day-ahead operation of BSSs. 25 The SOC level during any time interval is calculated according to (24). The BSS SOC must be within upper and lower bounds. Since the PMG scheduling is performed for a single day, the SOC level at the first and last hour of the day must be the same as shown in (25).

| Solving the proposed optimization problem by GAMS
Quadratic programming 74 is deployed to solve the proposed optimization problem subject to linear constraints. The CPLEX solver in GAMS 27 is used because of its higher simulation speed and accuracy. The scenario generation and scenario reduction are implemented in MATLAB 2018b, and they are imported to GAMS. The results of different scenario reduction

PV DG unit output power [kW]
Hour

| Cases and conditions
-In this paper, the following 5 cases are considered based on the uncertainty modeling method: -Case 1: The deterministic optimization problem 25 is considered. -Case 2: The MCS-based probabilistic optimization problem like 75 is considered. -Case 3: The scenario-based optimization problem using the k-means scenario reduction algorithm is considered. -Case 4: The scenario-based optimization problem using the k-medoids scenario reduction algorithm is considered.
-Case 5: The scenario-based optimization problem using the DEA scenario reduction algorithm is considered.
In Case 1, the typical deterministic optimization of PMG's operation using the average hourly WT and PV output energy generation is performed.
Case 2 includes RESs' uncertainties in the optimization procedure; however, no scenario reduction methodology has been considered. Although the obtained results under Case 2 are more accurate than others, the optimization problem solving would be time-consuming.
In addition, the introduced uncertainty modeling cases are studied under 2 following conditions based on the consideration of the BSS operation features in the OF: -Condition 1: The SOC changes are concerned in the OF to be minimized. -Condition 2: The SOC changes are not concerned in the OF to be minimized.

| Test system descriptions
In this study, a commercial PMG in Tehran, Iran has been considered for applying the proposed method. The selected PMG has been equipped with RESs and BSS. The information of the PV DG unit, including the PV modules characteristics, is presented in Table 1. 57,76 The characteristics of the WT and BSS units are demonstrated in Table 2, 77 and Table 3, 25 respectively. It has been assumed that the maximum power transmission capability of the distribution line, which connects the PMG to the utility grid is 350 kW. The maximum transmission capacity of power importing from the network is assumed to be similar to the maximum transmission capacity of power injection to the grid.
In Figure 4, the electrical load demand of understudy commercial PMG and contracted power to consumers as well as time-of-use (TOU) electricity price 25 are shown. The PMGs' electrical load as one of the most important inputs of the proposed optimization problem might affect the optimum results. Hence, it is necessary to determine the adequately precise data for electrical load demands. Unlike the output power of renewable-based DG units, the daily load curves are not usually uncertain. However, the scenario-based modeling could be applied for the PMG's load demand, while its electrical consumption is stochastic.
The historical data of wind speed and solar irradiance have been collected from the local meteorological center in Iran. The measured and recorded 10-minute values of wind speed and solar irradiance have been shown in Figure 5. These results have been measured every 10 minutes time intervals during 198 days of 2018. As can be seen, variations of weather data are remarkable.
Furthermore, the weighting coefficient corresponding to the SOC changes in the OF under Condition 1 is assumed to be 66, while it would be 0 under Condition 2.

| Scenarios generation for RESs by MCS
The statistical analyses are performed on the hourly values. The Beta PDF parameters are calculated using (3) and (4). Also, the required scenarios of the clearness

DG units output power [kW]
Hour PV DG unit WT DG unit index are generated using the MCS method, according to (5). The PV output power is calculated as a function of the simulated clearness index using (6)- (9). In this paper, 1000 scenarios have been produced for the PV out power to concern the corresponding uncertainties. In Figure 6A, the generated scenarios of PV output power are demonstrated.
The statistical parameters of wind speed, for example, mean value, standard deviation, and variance are determined. The Weibull scale and shape parameters are calculated according to (11) and (12). The simulated wind speeds are produced using MCS based on (14). Finally, the WT DG unit output power is calculated by (15). In Figure 6B, 1000 simulated scenarios of WT DG unit output power are shown.
The MATLAB 2018b environment is used to implement the MCS and scenario reduction methods. The computer, which has been used for performing simulations, has 8 GB RAM and Intel corei5 CPU.

| Scenarios reduction of RESs output power
In this paper, the number of generated scenarios of RESs output power is reduced to 10 by applying different scenario reduction methods such as k-means, k-medoids, and DEAbased clustering algorithms.
The results of the k-means clustering algorithm are shown in Figure 7. The probability of each cluster of PV DG unit output power and WT DG unit output power has been described in Figure 7C. As can be seen, the probability of clusters 5 and 6 is higher than others, whereas the probability of clusters 2 and 8 is less than other clusters.
The results of the k-medoids clustering algorithm are shown in Figure 8. The probability of each cluster of PV DG unit output power and WT DG unit output power has been shown in Figure 8C. The clustering results of the k-medoids algorithm are quite similar to the k-means-based scenario reduction. According to Figure 8C, all of the simulated The results of the DEA clustering algorithm are shown in Figure 9. The 3D plot has been used to clarify the PV and WT DG units output power clusters in Figure 9A,B. The probability of each cluster of the output power of PV and WT DG units has been described in Figure 9E.
As can be seen, the achieved results are distinguishing from those of other clustering methods. The results of scenario reduction based on DEA show that just the probability of three clusters is significant. It means that by applying the DEA, it is possible to consider only three scenarios for considering the system uncertainties. Clusters 2, 5, and 8 with nonzero probability value are shown in Figure 9C,D.

| Optimization results
The optimal PMG operation cost under various cases and different conditions based on uncertainty modeling and consideration of BSS operation cost are shown in Table 4. The results of the MCS-based method are considered as the most accurate ones and reference values because it is achievable to appropriate modeling of the uncertainties using the MCS. The results of various cases are compared with the reference values, and the inaccuracy of the deterministic-based model and the proposed scenario-based models using the scenario reduction algorithms are calculated.
Test results imply that the considerable inaccuracy occurs through applying the deterministic-based methods. The comparison test results infer that under Case 1 based on the determinist model, like the method of, 25 about 8.42% and 9.04% inaccuracy occur for BSS performance-based Conditions 1 and 2, respectively. The significant difference between the results of Cases 1 and 2 highlights the importance of uncertainties modeling. By using the k-medoids-based method, it is achievable to more accurate results with the fast calculations. The simulation results emphasize that the introduced method is useful and effective.
Under Case 1 using the deterministic model like, 25 the mean values for hourly clearness index and wind speed have been considered to determine the optimal day-ahead operation and scheduling of PMG. The deterministic hourly output power of DG units under Case 1 is shown in Figure 10.
The optimal operation variables, for example, PMG power purchased from the utility grid, BSS charging/discharging schedules, and the BSS SOC under various cases and Condition 1, are shown in Figure 11A,B,C, respectively. Figure 11C shows that the exchanged power with the utility under Case 1 is different from other scheduled values. This comparison implies that the optimum schedules based on the simplified deterministic methods are not adequately accurate. Therefore, the additional costs or even some interruptions might be imposed on the system due to inaccurate scheduling.
The power purchased from the utility under Cases 3 and 4 using the k-means and k-medoids algorithms is very similar to Case 2 values (as the reference case) during 5:00 pm-7:00 am. In addition, it is concluded that the scheduled power purchased from the utility according to the DEA-based method has more deviation from the reference values in comparison with k-means or k-medoids-based ones.
Under Condition 1, there is no difference between the schedules of the PMG BSS charging/discharging. It seems the BSS operation is not affected due to system uncertainties because the BSS performance features are considered in the OF. The consideration of the BSS performance features and the BSS operation costs in the OF leads to limit the BSS participation in the supply side.
Test results under Condition 2 are presented in Figure 12. The simulation results show that the actual PMG operation cost under Condition 2, including the BSS performance features or its operation cost, is higher than Condition 1. As can be seen, the scheduled exchanged utility power grid under Cases 1 and 2 are different. The scheduled exchanged utility power of Case 1 according to the deterministic-based method during 5:00 pm-7:00 pm is significantly different from that of Case 2 (as the reference case).
Since the BSS effectively participates in providing the PMG's required electricity under Condition 2, it is necessary to apply different scheduling for BSS based on the system uncertainties.

| Sensitivity analysis
The uncertainty level ratio is defined according to the increased standard deviation of the uncertain variables and the available state. The sensitivity analysis is performed for the uncertainty level ratio from 110% up to 200%. The sensitivity analysis results under various scenario reduction algorithms have been shown in Figure 13.
As revealed by test results shown in Figure 13, regardless of the BSS-based condition, the inaccuracy of the proposed scenario reduction-based methods is intensified due to the increment of uncertainty. On the other hand, the sensitivity analysis infers that the k-medoids-based method is more robust against the changes in the uncertainty level than the k-means and DEA-based ones. However, the inaccuracy of the k-means and DEA-based methods due to the scenario reduction would be less than 5% under various uncertainty levels.

| CONCLUSION
The PMG operation and scheduling could be adversely affected due to system uncertainties. The stochastic behaviors of PV and WT DG units output power should be concerned in the optimal day-ahead scheduling and operation. Although the MCS-based methods are adequately accurate to study the system uncertainties, their calculation speed is not satisfying. The importance of methods' computing time is highlighted when repetitive approaches such as heuristic optimization problems should be solved. In this paper, a new probabilistic scenario-based optimization method has been proposed for PMG's operation and scheduling. Different scenario reduction algorithms, for example, k-means, k-medoids, and DEAbased clustering algorithm, have been used in the proposed method.
The proposed method was applied to an actual commercial PMG in Iran, and the real historical data of wind speed and solar irradiance were used. Test results highlighted the impacts of uncertainty on optimal day-ahead scheduling of PMG. The proposed method was validated using the MCSbased simulation results. It was concluded that the k-medoids scenario reduction-based method is more accurate than the k-means and DEA-based ones. The sensitivity analysis results examined how the accuracy of the proposed method is affected due to changes in the uncertainty level of stochastic parameters under various cases and conditions. BSS capacity (kWh) SOC min minimum allowed BSS SOC SOC max maximum allowed BSS SOC x ′ offspring 24-dimension vector parameter of the differential evolution algorithm a random variable, which is used to generate the offspring vector parameter in the differential evolution algorithm Abbreviations RES, renewable energy source; PV, photovoltaic; WT, wind turbine; DG, distributed generation; BSS, battery storage system; EV, electric vehicle; ESS, energy storage system;