Optimal Day-Ahead Scheduling of a Smart Micro-Grid via a Probabilistic Model for Considering the Uncertainty of Electric Vehicles’ Load

This paper presents a new model based on the Monte Carlo simulation method for considering the uncertainty of electric vehicles’ charging station’s load in a day-ahead operation optimization of a smart micro-grid. In the proposed model, some uncertain effective factors on the electric vehicles’ charging station’s load including battery capacity, type of electric vehicles, state of charge, charging power level and response to energy price changes are considered. In addition, other uncertainties of operating parameters such as market price, photovoltaic generation and loads are also considered. Therefore, various stochastic scenarios are generated and involved in a cost minimization problem, which is formulated in the form of mixed-integer linear programming. Finally, the proposed model is simulated on a typical micro-grid with two 60 kW micro-turbines, a 60 kW photovoltaic unit and some loads. The results showed that by applying the proposed model for estimation of charging station load, the total operation cost decreased.


Introduction
Smart micro-grids (MGs) enable intelligent devices to adjust usage based on dynamic pricing or incentive signals. They also facilitate the integration of intermittent renewable resource and allow storage devices like electric batteries to discharge the stored energy back to the grid when it is economical [1][2][3]. There are some management strategies in order to operate the smart MGs, such as central management method in which the grid manager is responsible for the operation of the system [4], or the decentralized management method in which each group entity can be a decision maker [5].
Electric vehicles (EVs) and plug-in hybrid electric vehicles (PHEVs) are more appropriate both in terms of environmental pollution and energy costs compared to internal combustion engine vehicles [6]. One of the important advantages of the smart MG is the easier management of EVs and PHEVs due to the availability of the appropriate telecommunication infrastructure to link with them. An EV's charging station as a load aggregator can be a good solution to manage EVs and PHEVs more easily in the smart MG and to increase consumer welfare. In this case, consumers can charge their vehicles and sell energy stored in their battery to the smart MG [7]. Therefore, unlike the typical loads, PHEVs can PEVs is unknown. The distribution grid in [25] is installed with multiple charging stations for EVs and deals with solar energy uncertainty. Stochastic programming is used to deal with uncertainty. Furthermore, the electrical characteristics of EVs, including charging rate and battery capacity, are used in [26] to generate different scenarios for stochastic behaviors of EVs in a parking lot. Although the type of EVs and their charger levels are considered, their price responsibility is not modeled.

Novelty and Contribution
According to a review of past references, a complete model that considers the uncertainty of EV behaviors in the charging stations is not addressed. Most of the existing models have investigated the stochastic behavior of EVs in terms of arrival times, departure times, the amount of charging energy demand, the type of EVs and battery capacity, but there is no model to see all of these factors together.
There is also no model for considering the uncertainty of type of EVs chargers. Actually, the EVs in a charging station do not use a specific charger type. Some use a fast charger level 3, and some use a charger level 2. This factor is considered in the proposed model as a probabilistic parameter. Therefore, this paper tries to propose a complete model for considering this uncertainty in the optimal energy management of a smart MG. In this proposed model, some uncertain effective factors on the EVs charging station load such as battery capacity, type of EVs, SoC, charging power level and response to energy price changes (price sensitivity) are considered and simulated by the MCS method. Therefore, the contribution of this paper is as follows: • A model for considering the uncertainty of the EVs charging station load is presented using MCS.
The remainder of this paper is organized as follows. The system model is presented in Section 2. Then in Section 3, the proposed model for charging station load is presented. The scenarios generation and the model implementation are described in Sections 4 and 5 respectively. The optimization problem and the numerical results are provided in Sections 6 and 7, respectively. Finally, Section 8 states the concluding remarks. Figure 1 shows an overview of the intended model. The considered smart MG includes the EVs charging station, PV system as a renewable generation unit, micro-turbine (MTs) as a dispatchable generation unit and some loads. The main goal of the manager is to obtain minimum operating cost. It is assumed that all the system's components, other than EVs, belong to the manager. To this end, the necessary information, such as PV historical data, upstream energy price forecast and the possible feathers of EVs in the charging station, is firstly collected. Then, based on the modeling of existing components and equipment, optimal decisions are taken by the manager. These decisions include optimal values of purchasing/selling power from the upstream grid, and the optimal dispatch of the micro-turbines. The uncertainties in price, load and PV generation are also modeled by stochastic scenarios. In this section, the EVs charging station load is firstly modeled by the MCS. In the next step, the stochastic scenarios generation and reduction are expressed and finally, the implementation of proposed optimization model is explained.

EVs Charging Station Load Modeling
The power consumption or generation of an EVs charging station depends on several factors such as capacity of batteries; type of vehicle's connection to the smart MG; SoC, which depends entirely on the vehicle's driving patterns; and charging power level. There are two type of connection for EVs. Some vehicles only have charging capability and are unsuitable for vehicle-to-grid (V2G). Some vehicles have both charging and discharging capabilities and are suitable for V2G [10]. In addition, there are two rates of chargers named level 2 chargers with a low charge rate and level 3 chargers, which are known as fast chargers [27]. Furthermore, the shape of the charging station load profile can be affected by the changes in the charge and discharge programs of EVs in response to the electricity price and business hours of the charging station. In this section, all the mentioned factors are described below. Figure 2 shows the possible states of the type and the mode of EVs in charging station. According to this figure, the EVs (which can include all types such as PEVs and PHEV, etc.) are divided into two types-suitable for V2G and unsuitable for V2G. Each EV's owner can choose to charge or discharge their vehicle based on the electricity price at the time of use. Moreover, each EV's owner uses a suitable charger according to its power level and the vehicle charging technology. Some EVs are not able to use a level 3 charger due to their lack of direct current charging ports. In this paper, it is assumed that the smart charger in the charging station, by connecting the vehicles, has the ability to receive the information divided in Figure 2 and also some other information like SoC and battery capacity [28]. This information is sent to the manager via the telecommunication network, as shown in Figure 3. By registering this information, a database is created in which the specifications of the vehicles used from the charging station are available on each day of the week. Therefore, by having this information for a long time (e.g., one year), the probability distributions can be fitted.

EVs Charging Station Load Modeling
The power consumption or generation of an EVs charging station depends on several factors such as capacity of batteries; type of vehicle's connection to the smart MG; SoC, which depends entirely on the vehicle's driving patterns; and charging power level. There are two type of connection for EVs. Some vehicles only have charging capability and are unsuitable for vehicle-to-grid (V2G). Some vehicles have both charging and discharging capabilities and are suitable for V2G [10]. In addition, there are two rates of chargers named level 2 chargers with a low charge rate and level 3 chargers, which are known as fast chargers [27]. Furthermore, the shape of the charging station load profile can be affected by the changes in the charge and discharge programs of EVs in response to the electricity price and business hours of the charging station. In this section, all the mentioned factors are described below. Figure 2 shows the possible states of the type and the mode of EVs in charging station. According to this figure, the EVs (which can include all types such as PEVs and PHEV, etc.) are divided into two types-suitable for V2G and unsuitable for V2G. Each EV's owner can choose to charge or discharge their vehicle based on the electricity price at the time of use. Moreover, each EV's owner uses a suitable charger according to its power level and the vehicle charging technology. Some EVs are not able to use a level 3 charger due to their lack of direct current charging ports. In this paper, it is assumed that the smart charger in the charging station, by connecting the vehicles, has the ability to receive the information divided in Figure 2 and also some other information like SoC and battery capacity [28]. This information is sent to the manager via the telecommunication network, as shown in Figure 3. By registering this information, a database is created in which the specifications of the vehicles used from the charging station are available on each day of the week. Therefore, by having this information for a long time (e.g., one year), the probability distributions can be fitted. Appl. Sci. 2019, 9, x FOR PEER REVIEW 5 of 23  Therefore, the manager of smart MGs can use these probability distributions and estimate the amount of EVs charging station load before day of operation. This estimation for EVs helps the decision maker to operate the system in optimal points in presences of severe uncertainty of EVs behaviors. The considered distributions are described in Section 3.1 and the proposed algorithm based on MCS for modeling the EVs load is described in Section 3.2.

Probability Distributions for Stochastic Parameters of EVs
It is assumed that the type of EVs is likely to have a binomial distribution. Here for simplicity, the probability of being V2G or not for each EV is considered to be 0.5 [29]. The maximum number of EVs is assumed to be 70 vehicles per day [30]. Thus, 70 random numbers based on the mentioned distribution are generated to determine the type of EVs in every repeat loop of the MCS. The value 1 for this random binary variable means that the type of EV j is suitable for V2G and 0 value for it means the type of EV j is unsuitable for V2G.  Therefore, the manager of smart MGs can use these probability distributions and estimate the amount of EVs charging station load before day of operation. This estimation for EVs helps the decision maker to operate the system in optimal points in presences of severe uncertainty of EVs behaviors. The considered distributions are described in Section 3.1 and the proposed algorithm based on MCS for modeling the EVs load is described in Section 3.2.

Probability Distributions for Stochastic Parameters of EVs
It is assumed that the type of EVs is likely to have a binomial distribution. Here for simplicity, the probability of being V2G or not for each EV is considered to be 0.5 [29]. The maximum number of EVs is assumed to be 70 vehicles per day [30]. Thus, 70 random numbers based on the mentioned distribution are generated to determine the type of EVs in every repeat loop of the MCS. The value 1 for this random binary variable means that the type of EV j is suitable for V2G and 0 value for it means the type of EV j is unsuitable for V2G. Therefore, the manager of smart MGs can use these probability distributions and estimate the amount of EVs charging station load before day of operation. This estimation for EVs helps the decision maker to operate the system in optimal points in presences of severe uncertainty of EVs behaviors. The considered distributions are described in Section 3.1 and the proposed algorithm based on MCS for modeling the EVs load is described in Section 3.2.

Probability Distributions for Stochastic Parameters of EVs
It is assumed that the type of EVs is likely to have a binomial distribution. Here for simplicity, the probability of being V2G or not for each EV is considered to be 0.5 [29]. The maximum number of EVs is assumed to be 70 vehicles per day [30]. Thus, 70 random numbers based on the mentioned distribution are generated to determine the type of EVs in every repeat loop of the MCS. The value 1 for this random binary variable means that the type of EV j is suitable for V2G and 0 value for it means the type of EV j is unsuitable for V2G. The EVs respond to the electricity market price and set their charging or discharging program based on it. Here, the charging or discharging programs of EVs are assumed to have a binomial distribution with the probability of failure and success shown in Table 1 [31]. It shows the probability of responses to the price at different hours of the operating day. According to this table, the probabilities of charging an EV at off-peak and peak times are 0.95 and 0.15, respectively. Furthermore, the probabilities of discharging at these times are 0.5 and 0.85, respectively. Thus, the success probabilities of this random binary variable at off-peak and peak times are equal to 0.95 and 0.15, respectively. Furthermore, the failure probabilities at off-peak and peak times are equal to 0.05 and 0.15, respectively. Therefore, we are faced with a binomial distribution with an unequal chance of success and failure. So we use the roulette wheel selection method [32] to generate the binary random numbers. The value 1 for this random binary variable means that the EV j is charging and 0 value for it means the EV j is discharging. 3.1.3. Type of Charger Used by EV j (m 2 j ) The type of chargers used by EVs is modeled by a binomial distribution. In this case, the binary variable has a binomial distribution with the probability of failure and success shown in Table 2. According to this table, the probability of using level 2 and the level 3 chargers are equal to 0.6 and 0.4, respectively. Therefore, we are faced with a binomial distribution with an unequal chance of success and failure. So, we use the roulette wheel selection method [32] to generate the binary random numbers. The rates of level 2 and level 3 chargers are considered 5 kW and 20 kW, respectively [15]. The value 1 for this random binary variable means that the EV j uses charger level 2 and 0 value for it means the EV j uses charger level 3. Table 2. The probability of using the EVs from chargers.

Charger Level Probability
The initial SoCs of EVs batteries, with regard to [19], is determined in the form of possible scenarios. In this method, the SoCs follow a normal distribution with the mean and standard deviation shown in Table 3. According to Figure 4, the normal probability density function (PDF) for the SoC is divided into five scenarios, in which the probability of each scenario is shown in Table 4. Therefore, the roulette wheel selection method is used to obtain the initial SoC of EV j.   According to [33], the batteries capacity of EVs follows a normal distribution with mean ( bat C μ ) and standard deviation ( bat C σ ) given in (1) and (2), respectively. According to Table 5, the random values for the battery capacity are generated based on normal PDF with the above random parameters [31]. Furthermore, due to the heterogeneity of the various types of EVs in the case of the market share, we are faced with a non-uniform distribution for generating the random numbers according to Table 5. So, the roulette wheel selection method is used to generate the random numbers.

Probabilistic Estimation of EVs Charging Station Load
One of the most commonly used numerical methods for handling the uncertainties is MCS. This method is used when the system is highly non-linear or it has a lot of uncertain variables [34]. Although batteries have memory and it is better to use the sequential MCS, which generates sequential samples of SoCs for numerous time intervals [35], but we have used non-sequential MCS to avoid complicating the simulation and time-consuming convergence. Therefore, this method has been used in the proposed model because of its many uncertain parameters. The proposed algorithm for the estimation of EVs charging station load is as follows:  According to [33], the batteries capacity of EVs follows a normal distribution with mean (µ C bat ) and standard deviation (σ C bat ) given in (1) and (2), respectively.
where MinC bat and MaxC bat are the minimum and the maximum capacity of available batteries. According to Table 5, the random values for the battery capacity are generated based on normal PDF with the above random parameters [31]. Furthermore, due to the heterogeneity of the various types of EVs in the case of the market share, we are faced with a non-uniform distribution for generating the random numbers according to Table 5. So, the roulette wheel selection method is used to generate the random numbers.

Probabilistic Estimation of EVs Charging Station Load
One of the most commonly used numerical methods for handling the uncertainties is MCS. This method is used when the system is highly non-linear or it has a lot of uncertain variables [34]. Although batteries have memory and it is better to use the sequential MCS, which generates sequential samples of SoCs for numerous time intervals [35], but we have used non-sequential MCS to avoid complicating the simulation and time-consuming convergence. Therefore, this method has been used in the proposed model because of its many uncertain parameters. The proposed algorithm for the estimation of EVs charging station load is as follows: Randomly generate samples for type of charger used by EV j, type of EV j, charging or discharging of EV j, SoC of EV j and battery capacity of EV j all based on their distribution functions assigned in Section 3.1.

5.
With m 2 j and m type j equal to 1, if m C/D j is equal to 1, then the charging time of EV j can be calculated via (3) with the rate of a level 2 charger (i.e., cl = 2). Otherwise the discharging time of EV j can be calculated via (4) with cl = 2. If m type j is equal to 0, thus the EV j can only be charged with the charging time as (3).
where t cl c,g,j and t cl d,g,j are the charging and discharging time of EV j with charger level cl which uses charger g. r cl c,g and r cl d,g are the charging and discharging rates of charger level cl and charger g. Furthermore, SoC max and SoC min are the maximum and minimum SoC for EV j. The similar process occurs when m 2 j equal to 0 with the difference that the rate of charger level 3 would be considered in (3) and (4) (i.e., with cl = 3). 6.
The charging or discharging energy of EV j or E j is calculated using (5). 7.
If j < N EV , j = j + 1 and go back to 4; otherwise calculate the charger load using (6).
where P sta t,g,MC is the average consuming power of charger g in repetition M. 8.
Evaluation of P sta t,g = (1/M) M P sta t,g,MC . P sta g is the average consuming power of charger g in all repetitions. 9.
Check if P sta t,g is converged then go to 10, else M = M + 1 and go to 3. 10. If g < N g , g = g + 1 and go back to 2; otherwise calculate the EVs charging station load through the sum of the calculated chargers loads using (7).
The proposed MCS-based algorithm is presented in Figure 5. The convergence condition of the loop is considered as follows. First the relative error RE is calculated every 10,000 simulations using RE = (σ / √ n)Z δ/2 /µ , where σ / √ n represents the standard error and Z δ/2 is the confidence level. Its equal to 1.96 for 95% confidence interval. Furthermore, µ is the mean of the simulation. The simulation stops if the RE is less than 1% [36].

Model Implementation
The operation optimization problem is simulated based on the following steps: 1. Receiving the forecasted values of upstream market prices, demand power of loads and PV historical data.

Uncertainties of Price, Load and PV Generation
In order to consider the forecasting uncertainties in the operating parameters such as load, price and PV generation, stochastic scenarios are generated. To this end, a large number of possible scenarios of the above parameters are generated based on their PDFs. In fact, we assume the manager can fit the appropriate distributions on the forecasting error data. Therefore, the forecasting error of the system's load and price are modeled with a normal distribution with an average of zero and a standard deviation of 10% of their hourly forecasted values [37]. Furthermore, the historical solar irradiance data is modeled with the beta distribution [38]. Using the MCS method, 2000 stochastic scenarios are generated for each of the above parameters based on their PDFs. So, the probability of each scenario is 1/2000. Then, the set of system scenarios is formed. Each stochastic scenario represents a possible operating mode of the system and consists of a vector as ρ s,t = [ρ PV s,t , ρ price s,t , ρ load s,t ] which includes the PV generation, prices and loads scenarios. In this study, the correlation analysis between the scenarios of different parameters is ignored. Although the high number of stochastic scenarios increases the accuracy of the answers, it slows down the problem-solving time. In stochastic optimization problems, one of the most commonly used scenarios reduction methods is the Kantorovich distance. In this paper, this method is used to reduce the number of random scenarios. Further details of this method are given in [39]. So, the system scenarios are reduced to 200 numbers. In fact, it is assumed that these 200 stochastic scenarios can cover the most possible modes of the system.

Model Implementation
The operation optimization problem is simulated based on the following steps: 1.
Receiving the forecasted values of upstream market prices, demand power of loads and PV historical data.

2.
Organizing the normal and Beta PDFs of the uncertain parameters at all 24 operation time slots.

3.
Generating stochastic scenarios based on the mentioned PDFs and then reducing them by the Kantorovich distance algorithm. Each scenario consists of three parts as described before.

4.
Computing the EVs charging station load by the proposed method.

5.
Applying the scenarios and EVs charging station load to the optimal operation problem of smart MGs. 6.
Solving the optimal operation problem for all scenarios and saving the results for each decision variable, for each scenario and at each time slot. Figure 6 illustrates the model implementation process.
4. Computing the EVs charging station load by the proposed method. 5. Applying the scenarios and EVs charging station load to the optimal operation problem of smart MGs. 6. Solving the optimal operation problem for all scenarios and saving the results for each decision variable, for each scenario and at each time slot. Figure 6 illustrates the model implementation process.

Objective Function
The objective function is minimizing the smart MG's operating cost as follows: , , The objective function (8)

Objective Function
The objective function is minimizing the operating cost as follows: The objective function (8) is costs for day ahead operation. The costs consist of purchasing energy from the upstream grid and EVs, as well as the cost of the PV unit (C gen p,t,s ) and micro-turbines (C ope i,t,s ) operation. λ da t,s in (8) is the DA market price in scenario s at time t. P da t,s is the selling/purchasing power from the upstream grid in scenario s at time t. The smart MG may sell energy in some intervals, so P da t,s would be negative if the smart MG is selling energy to the upstream grid. There are interesting optimization methods in [40][41][42][43][44][45][46]. We formulate the optimization problem as mixed-integer linear problem (MILP).

Constraints
The system constraints are given in the following.

Operating Constraints for Micro-Turbines
For ∀i, t, the following constraints are considered: C start i,t,s = k start on i,t,s where C ope i,t,s is the operation cost of micro-turbine i in scenario s at time t and consists of generation, startup and emission costs as (9). C gen i,t,s is the generation cost of micro-turbines i in scenario s at time t and is modeled in (10)- (14) by piecewise linear function [47]. a i is the generation cost of micro-turbine i at its minimum generation. m is the segments index in the cost function of micro-turbine i. N i and λ i,m are the number of segments in the cost function of micro-turbine i and the marginal cost of segment m in the cost function of micro-turbine i ($/kWh), respectively. P max i,m is the maximum limit of power generation in the m-th segment of micro-turbine i cost function (kW). P max i,m,t,s is the power generation of micro-turbine i from the m-th segment in scenario s at time t. Furthermore, Start-up cost and emission cost are given in (15) and (16), respectively. k start is startup constant cost. CO 2,i,t is carbon dioxide pollutant of micro-turbine i at time t and C CO 2 is externality cost of generation carbon dioxide ($/kg).
In (17), P i,t,s is the generating power of micro-turbine i in scenario s at time t and is limited to their bounded maximum and minimum capacity, i.e., P max i and P min i . RU i and RD i are the ramping up and down rates of micro-turbine i and are limited in (18) and (19), respectively. The (20) and (21) impose the minimum up/down time constraints for micro-turbines. MUT i and MDT i are the minimum up and down times of micro-turbine i. Finally, the binary variables relationships are formulated as (22) and (23).

PV Operation Cost
The generation of PV unit is strongly dependent on environmental parameters such as temperature and amount of sunlight. The total output power of the PV system at a maximum power point is calculated in (24) [51]. P p,t,s = N PV S N PV P P p,STC GT t,s 1000 T t,s = T amb + GT t,s 800 (NOCT − 20) (25) where in (24), P p,t,s , P p,STC , GT t,s and γ are the output power of PV unit p at time t, the cell's rated power in the standard measurement (i.e., at 25 • C, radiation levels 1000 W/m 2 and wind speed 1 m/s), the radiation level at time t, the temperature coefficient, respectively. N PV s and N PV p are the number of series and parallel cells. Furthermore, T amb and NOCT are the ambient temperature and normal operating cell temperature. The generation cost of PV system (i.e., C gen p,t,s ) is calculated in (26), which includes the investment, operation and maintenance costs.

Technical Constraints
The amount of power exchanged with the upstream grid at any time is limited as (28).
where P grid max is the maximum exchangeable power with the upstream grid.

Power Balance
At any time, the total power of the micro-turbines and the actual power exchanged with the upstream grid should be equal to the net load of the system.
where P Load t,s is the MG load in scenario s at time t. P station t is the calculated charging station load. It should be noted that network constraints of the smart MG are neglected. Based on [52], there are two justifications for this simplification. First, a MG practical size may be limited to a few MVA [53]. IEEE draft standard P1547.4 specifies an upper limit of 10 MVA [54]. Due to the limited capacity and the proximity of load and generation in an MG, the network is typically not the limiting constraint. Second, the network model greatly complicates operation model without much likely benefit.

System Data
The proposed optimization problem is applied to a typical smart MG including two 60 kW similar micro-turbines, one 60 kW PV system, one EVs charging station and some loads. The micro-turbines' parameters are shown in Table 6 [52]. The carbon dioxide (CO 2 ) produced by a micro-turbine is considered to be 0.7 kg/kWh and its emission cost is 0.001 $/kg [55]. The micro-turbines' quadratic production cost is approximated by a three-piecewise linear function. The PV system consists of 6 × 25 solar modules parallel to 25 rows, each with 6 series modules. The rated power of each module is 400 W in the standard condition. The price of each module including the power electronics (inverter) and installing costs, is considered $1 per watt. The operation and maintenance cost of the PV system is assumed to be 1.5% of its initial investment. The interest rate and the period for the loan repayment of the PV system are considered to be 7% and 20 years, respectively. According to the PV system's specifications, its capacity factor is considered to be 26%. Historical data of direct solar irradiance power is extracted from [56]. The scheduling horizon is 24 h and each time interval is considered to be 1 h. The forecasted loads and upstream market prices are taken from [52]. As can be seen, hour 8 is the beginning of the peak periods. The PDFs of uncertain parameters are calculated and shown in Table 7. In this table, the mean values of parameters are hourly forecasted parameters. Based on this table and Section 2, the number of 200 scenarios are considered. The proposed EVs charging station load model and scenario generation and reduction process are simulated using MATLAB software while the proposed optimization model is solved using CPLEX under GAMS [57]. The computing time for calculating the MCS-based model is 75 s. Furthermore, the scenarios generation process takes 45 s and finally the optimization problem is successfully solved in 105 s. Figure 7 shows the simulation result of the proposed model for calculating the load profile of the EVs charging station. This figure is the result of using maximum numbers of charging station's capacity (i.e., 70 EVs) during the operating day because we have considered 70 EVs for type of EVs random values. The batteries' capacities for these EVs are based on their market share that have been mentioned in Table 5. As can be seen, given the changing behavior of the EVs charging program, the charging station will be considered as a power generator from the beginning of the peak period (i.e., hour 8) in response to the price changes at this time. In other words, due to Table 1, the probability of discharging at peak times is 85%. So, most of the EVs discharge at this period and hence we can consider charging stations as a power generator. On the other side, the probability of charging at off-peak times is 95%. Therefore, most of the EVs charge at hours 1-8 and hence we can consider a charging station as a load during this period.

Simulation Results
Appl. Sci. 2019, 9, x FOR PEER REVIEW 16 of 23 charging station will be considered as a power generator from the beginning of the peak period (i.e., hour 8) in response to the price changes at this time. In other words, due to Table 1, the probability of discharging at peak times is 85%. So, most of the EVs discharge at this period and hence we can consider charging stations as a power generator. On the other side, the probability of charging at offpeak times is 95%. Therefore, most of the EVs charge at hours 1-8 and hence we can consider a charging station as a load during this period.  Table 8 shows the output values of the proposed DA operation. It contains mean and SD values of 200 scenarios and includes generation of micro-turbines and PV unit and buying from upstream grid. As can be seen, the amount of power purchases from the upstream grid is reduced between hours 11-17. However, the MG demand, as well as the market price will peak at these times. The reasons for this can be stated as follows. The PV unit generation in these period reaches the maximum, i.e., 50 kW and more. Furthermore, according to Figure 6, during these hours, the EVs charging station produces most of its energy between 40 kW and 65 kW because the high market price at these periods encourages the EVs to sell the stored energy to the MG. On the other hand, the high market price forces the MG to dispatch more of micro-turbines. In this regard, the production of microturbines is increased in these hours. Therefore, the MG can use its internal power resources instead of purchasing costly power from the upstream grid.   Table 8 shows the output values of the proposed DA operation. It contains mean and SD values of 200 scenarios and includes generation of micro-turbines and PV unit and buying from upstream grid. As can be seen, the amount of power purchases from the upstream grid is reduced between hours 11-17. However, the MG demand, as well as the market price will peak at these times. The reasons for this can be stated as follows. The PV unit generation in these period reaches the maximum, i.e., 50 kW and more. Furthermore, according to Figure 6, during these hours, the EVs charging station produces most of its energy between 40 kW and 65 kW because the high market price at these periods encourages the EVs to sell the stored energy to the MG. On the other hand, the high market price forces the MG to dispatch more of micro-turbines. In this regard, the production of micro-turbines is increased in these hours. Therefore, the MG can use its internal power resources instead of purchasing costly power from the upstream grid. The maximum amount of purchased power from the upstream grid is 265 kW at hour 21 and at a price of 8.4 $/kWh. At this time, the micro-turbine generation is reduced to 44 kW. The output of PV unit is zero and the station's generation is reduced to 21 kW because the market price is low and most of EVs will be discharged to the MG. So, the MG's manager increases its DA power procurement from the main grid in this situation. The minimum amount of purchased power from the upstream grid is 98 kW at hour 14 and at a price of 21.31 $/kWh. However, the MG's demand is high at this time (329.28 kW). The PV output is 57 kW and also the station sells 54 kW to the MG. Therefore, with increasing consumption and market prices, the MG manager will reduce its cost by operating more than internal power sources such as micro-turbines and PV units. The EVs charging station will be operated as an internal power source by engaging the EVs in the demand response program. The total cost of the operation in this simulation case study is $717.
In order to realize the effectiveness of the proposed MCS based algorithm for estimating of charging station load, a sensitivity analysis is performed. Table 9 shows the results of this sensitivity analysis on the uncertain parameters of EVs. i.e., each time the simulation of the proposed algorithm is performed, one of the uncertainty parameters is not considered. As it appears, the uncertainty of EVs type has not had much impact on the curve. In contrast, other parameters have changed the curve. If the uncertainty of the charger type is not taken into account (that means all EVs are charged or discharged by a level 2 charger), then the amount of energy level exchanged with the MG will be decreased because charging or discharging duration will be increased, so the fewer of EVs will be used in a 24 h operation period. On the other hand, if the uncertainties of SoC and battery capacity are not considered, the load curve will change more. In this case, the energy interaction of the station with the MG will change completely because according to (3) and (4), these parameters have direct effect on the station load curve. The station's load curve in the case of ignoring the EVs price sensitivity has a different shape. In this case, the EVs do not discharge their stored energy despite the price increase. Table 8 is presented in order to understand how these curves effect on the optimal DA solutions. As previously mentioned, the total cost of the operation is $717. The total energy produced by the micro-turbines and the upstream grid is 1040 kWh and 5131.8 kWh in a period of 24 h, respectively. These values are calculated by applying the proposed method for the charging station load. This state is considered as the base case and the results of sensitivity analysis are compared with this case. Table 10 shows the results of sensitivity analysis on the EVs uncertainty parameters. According to this table, ignoring any of these parameters in the calculation of the EVs charging station load leads to higher operating costs. For example, if the uncertainty of the type of chargers is not taken into account, the total amount of micro-turbine generation will decrease by 2.7% (1012 kWh) and the purchasing power will increase by 0.1% (5182 kWh). Furthermore, the total operating cost will increase by 0.55% ($721). The type of EVs uncertainty has the least impact on the operation cost. It increases cost only 0.08%. In contrast, ignoring the uncertainty of the EVs price sensitivity has the largest impact on the optimal solutions. It increases the operating cost by 21.2%. This result shows the importance of uncertainty in EVs price sensitivity. Uncertainties in SoC and uncertainty in battery capacity have also increased the cost by 4.8% and 7.5%, respectively, which uncertainty of EVs battery capacity has a fairly large impact on cost and optimal solutions. Overall, uncertainties in SoC, battery capacity and price sensitivity have a higher impact on the load profile and operating cost compared to uncertainties in the type of EVs and type of chargers.

Conclusions
In this paper, a model based on the MCS was presented to estimate the load of the EVs charging station and was used in an optimal operation problem of a smart MG. This model covered the uncertainty parameters of EVs including type of EVs, type of chargers, SoC, battery capacity and price sensitivity. Ignoring any of these parameters changed the optimal solutions. The results of the sensitivity analysis on these parameters indicated that the uncertainty in price sensitivity, battery capacity and SoC of EVs have a higher influence on the operating cost. Therefore, ignoring them can lead to higher costs. The uncertainty of the types of chargers and types of EVs had not a significant impact on the cost because it did not increase the station's demand and the MG's manager prevents cost increases with a slight change in the dispatch of micro-turbine and buying from the upstream grid. The proposed MCS-based model takes into account the decisive factor on the EV's load profile concurrently. It has also an easy implementation process through the proposed MCS method and efficient simulation time. Therefore, the manager of MGs can estimate the load profile of EVs one day before of operation. Although the proposed model covers the uncertainty of EVs behaviors but there is a possibility of deviation of considered parameters for PDFs and therefore for estimated load profile.     Vehicle-to-grid