A Bi-Layer Multi-Objective Techno-Economical Optimization Model for Optimal Integration of Distributed Energy Resources into Smart / Micro Grids

: The energy management system is executed in microgrids for optimal integration of distributed energy resources (DERs) into the power distribution grids. To this end, various strategies have been more focused on cost reduction, whereas e ﬀ ectively both economic and technical indices / factors have to be considered simultaneously. Therefore, in this paper, a two-layer optimization model is proposed to minimize the operation costs, voltage ﬂuctuations, and power losses of smart microgrids. In the outer-layer, the size and capacity of DERs including renewable energy sources (RES), electric vehicles (EV) charging stations and energy storage systems (ESS), are obtained simultaneously. The inner-layer corresponds to the scheduled operation of EVs and ESSs using an integrated coordination model (ICM). The ICM is a fuzzy interface that has been adopted to address the multi-objectivity of the cost function developed based on hourly demand response, state of charges of EVs and ESS, and electricity price. Demand response is implemented in the ICM to investigate the e ﬀ ect of time-of-use electricity prices on optimal energy management. To solve the optimization problem and load-ﬂow equations, hybrid genetic algorithm (GA)-particle swarm optimization (PSO) and backward-forward sweep algorithms are deployed, respectively. One-day simulation results conﬁrm that the proposed model can reduce the power loss, voltage ﬂuctuations and electricity supply cost by 51%, 40.77%, and 55.21%, respectively, which can considerably improve power system stability and energy e ﬃ ciency. M.E.; formal analysis, M.R., and M.E.; investigation, M.R.; resources, M.R.; data curation, M.R.; writing—original draft preparation, M.R.; writing—review and editing, M.R., M.E., and M.H.A.; supervision, M.H.M., P.S.; project administration, M.R., and M.E. All authors have read and agreed to the published version of the


Introduction
With the increasing trend in global energy demand, concerns have been raised over the decline in fossil fuel resources and environmental pollution. Consequently, planners and stakeholders seek to maximize energy production by integrating renewable energy sources (RESs) and electrification of the transportation sector. Further, due to the insufficiency of the conventional distribution grids in supporting high penetration of RESs and electric vehicles (EVs), the upgrading process toward momentary parameters sent by the DSO. However, in [12], EVs decision making parameters are only used to solve local sub-problems and it shares limited information with EV aggregator. In [16], demand-side energy management in microgrids has been accomplished using a scalable and robust method to reduce network operational costs. According to results, customers' participation in electricity providing base on bi-directional energy trading mechanisms can significantly improve the network operation and decrease the electricity cost. However, in this work, all customers are considered the same type and also the need for local storage units like ESS has been neglected. In [17], optimal energy management of an autonomous microgrid has been accomplished to increase network stability during a power outage. In this study, the role of ESSs in improving network performance and reducing costs and pollutants has been investigated.
Authors in [18] developed an optimal demand-side energy management strategy in a renewable energy integrated residential microgrid based on demand response and real-time electricity prices. In this study, a genetic algorithm (GA) is used to minimize costs, peak-to-average (PAR) ratio, and customers' discomfort. In [19], a nonlinear multi-objective problem is formulated for optimal placement of EV charging stations with the integration of renewable resources. In this paper, the objective function is solved using a non-dominated sorting genetic algorithm to minimize power losses and voltage deviation. In [20] regardless of RESs and the potential role of EVs, a dynamic energy management model is proposed to optimally schedule the network load demand and energy storage systems using machine learning and optimization algorithms. Results validate the effectiveness of this model in minimizing the network operating costs and modifying the network demand curve. Reference [21] provides an algorithm for simultaneous determination of the optimal capacity of the charge stations and RESs, in which the EV charging pattern and the output of RESs are coordinated taking into account the peak demand factor at low-load hours and time-of-use electricity prices. In [22], a simultaneous optimization method is proposed to integrate RESs and EVs optimally into power systems. Although the objective functions defined in [18,19] have been modeled as a multi-objective function, but their solving method (weighting coefficient method) is very simple which in such cases does not result in the optimum solution. A novel energy management strategy is proposed in [23] to supply demand in islanded microgrid including Photovoltaic (PV)/wind/diesel generator and ESS. The results confirmed the capability of the hybrid design of microgrids with distributed energy resources to deal with the challenges imposed by non-conventional energy sources. However, the proposed model relies on initial guesses to find the optimal solution (i.e., location, type, and capacity of resources are given by authors) that might not lead to the accurate and optimum solution. Authors in [24] formulated an optimization problem for optimal allocation of EV parking lots and management of EVs charging program. In this paper, the impact of EVs penetration on the electric power system operating costs is investigated. In [25], techno-economic studies have been done to investigate the operation of an islanded hybrid energy system with EV charging stations equipped with PV and ESS during the daytime. In this work, EVs are modeled as non-controllable loads without V2G capability. Authors in [26] introduced a cost-effective operating framework to design a fast-charging station equipped with RESs and energy storage systems. Results show that optimal collaboration of RESs and ESSs is the best solution from the economic point of view. However, in this study, there is no mention of technical indicators.
By reviewing the most recent studies, it can be argued that extensive computations have been performed in the present literature, but defining objective functions and optimization constraints without simultaneous consideration of the technical and economic parameters have reduced the effectiveness and accuracy of the optimization results. Furthermore, the authors of these models have not specified what specific strategy they have applied to manage the uncontrolled charging and discharging of EVs and ESS in order to achieve the optimal power system operation condition, and they only addressed the economic power dispatch problem. It should be noted that none of the available works proposed a comprehensive model that simultaneously determines the optimal configuration of Energies 2020, 13, 1706 4 of 25 microgrid and provides an energy management strategy to coordinate grid-integrated DERs with a centralized power plant.
In summary of the above research gaps, this study intends to present an optimal energy management strategy to overcome the challenges of integrating distributed energy resources into microgrids. To this end, a multi-objective optimization problem consists of minimizing the total power supply cost, power losses, and voltage deviations are formulated and solved using the Pareto dominance based GA-PSO algorithm. The proposed model is a novel two-layer stochastic program that in the outer layer, the optimal site and size of DERs are obtained. In the inner layer, the energy management strategy is applied using an integrated coordination model (ICM) to optimally schedule the charging and discharging of EVs and ESSs by fulfilling techno-economic constraints. The ICM is a Mamdani-type Fuzzy inference system that makes use of customers' load information, EVs and ESS state of charge, and time of use electricity price. The demand-side energy management program is applied to obtain hourly load information, which has two advantages: cost reduction by performing energy management in the demand-side and achieving more accurate data related to consumption. Since this problem is defined as multi-objective, a set of answers (Pareto points) is obtained from which the best answer must be selected. Therefore, we present a method that calculates the Fuzzy membership value of each point to derive the point with the highest membership value as the best solution. The main contributions of this paper are listed as follows: • A multi-objective optimization problem is formulated for the grid-connected microgrid to realize the appropriate grid-integration of renewable resources, EV charging stations, and energy storage systems. • A two-layer optimization framework is developed to obtain optimal site and size of DERs, simultaneously, and coordinate DERs operation with the grid. • A Fuzzy-based ICM is developed for optimal scheduling of charging and discharging of EVs and ESS.

•
A time-of-use based demand response program is implemented to investigate how customers behave in response to changes in electricity prices.

•
A comprehensive comparison between our proposed algorithm with other algorithms reported in the literature has been reported in this work.
The remainder of this paper is organized as follows. Section 2 explains the modeling of system components in detail. Section 3 is devoted to the formulation of the proposed approach. Section 4 provides the simulation results, and finally, Section 5 concludes the paper.

Solar Cell
According to the following equations from [19], the output power of solar cells is affected by solar cell temperature T C , so we have: where NOCT is nominal operating cell temperature, T amb is the ambient temperature which is assumed to be • C, and Sun is the intensity of the solar radiation. In order to generate the pattern of solar radiation, the beta probability distribution function is used [27] as follows: Energies 2020, 13, 1706 In Equation (2), β and α are beta distribution parameters that are calculated based on Equations (3) and (4) in term of µ s and σ s , which are the man and the standard deviation of the solar radiation derived from statistical data. The output power of the solar cell regarding its energy efficiency η pv is calculated as follow:

Wind Turbine
Here, the output power of a wind turbine is derived taking into account three parameters (turbine location, wind speed and, air mass direction) as in [19]. Meanwhile, the wind speed will have the greatest impact on the output of the turbine; therefore, the Weibull probability distribution function is used to generate random wind speed variation [24]: where λ and k are, respectively, the scale and shape parameters. In the following, considering the air mass m and wind speed v, we can have: Equation (7) calculates the kinetic energy of an airflow that is used to obtain power transmitted from wind turbine blades. m in Equation (8), is rewritten by the ρ (air density), A (area covered by the turbine blades), and L (length of the turbine blades on a meter scale). In this paper, ρ is 1.225 kg/m 3 at 15 • C and 1 atm. Finally, Equation (9) calculates the power generated by wind turbines.

Energy Storage System
Optimal scheduling of ESS leads to increased power balance and frequency stability [14]. To this end, ICM is applied to derive optimal charging and discharging patterns of the storage system. ESS specifications are given in Table 1 [28,29].  where, ∝ dch is the self-discharge rate, P chr/dch ESS is the charging or discharging power, η ESS is the ESS charging/discharging efficiency, ∆t ESS is the duration of charging or discharging, ECAP is the ESS capacity, and η conv = 70%, is the AC/DC converter efficiency. It should be noted that in ESS charging mode the value calculated for the numerator of Equation (11) (remaining load) would be positive and in discharging mode it is negative.

Probabilistic Model of Parking Lot Hourly Electricity Demand
Based on [30], a single EV probabilistic demand is modeled to obtain the parking lot hourly demand considering different types of EVs and different driving modes. Tables 2 and 3 represent EVs specifications adapted from [31]. Since full battery discharge can reduce the battery lifetime, the depth of discharge (DOD) is set to 80%. The Log-Normal distribution function has been used to calculate the expected EVs daily mileage as follows [32,33]: where X is the random variable with a mean of zero and variance of one. µ c and σ c are the lognormal distribution parameters which are calculated from the mean and standard deviation of the distance traveled by the EVs based on statistics [34,35].
Another parameter that needs to be taken into account is the maximum distance that EVs can travel with a fully charged battery Dist max , which is obtained from Equation (17): where BCAP is the EV battery capacity in kWh and E c is the energy consumption per mile. To calculate the expected energy demand of EVs, considering four different driving modes, we may have: Moreover, to calculate the desired state of charge at the moment of leaving the parking lot, the time of arrival t arr and departure t dep as well as the duration of EVs availability in the parking lot should be calculated. The duration time, t dur is obtained as follows [36]: where µ and σ are the mean and standard deviation of arrival and departure time based on historical data, respectively. X 1 and X 2 are normally distributed random variables. Equation (24) gives the desired state of charge based on the calculated parameters and the charging rate P chr EV :

Objective Function
The objective function is written as a multi-objective problem and consists of three parts as follows: where, f 1 is the network power losses, f 2 is the system voltage fluctuations and f 3 is the electricity supply cost. Since our problem is modeled as a multi-objective function, a set of points (Pareto points) is obtained as optimal solutions. So, we proposed the Fuzzy membership rule-based approach to choose the best optimal point that meets all the constraints. This process leads to finding the optimal site and size of DERs, and the charging and discharging program of the ESS and EVs over 24 hours to ensure the efficient and reliable operation of the smart grid.

Power Losses (f 1 )
The active power loss is calculated as follow: The total voltage profile can be calculated by,

Electricity Supply Costs
Energies 2020, 13, 1706 Equation (29) shows the amount of demand provided by the centralized power plant (CPP). Equation (30) calculates the cost of EV and ESS charging in which the amount of power provided for the charging process is multiplied by the energy price. The charging durations are ∆t chr m and ∆t chr ESS for the EV and ESS, respectively. Equation (31) calculates the profit from EV and ESS discharging and power injection into the network. Equation (32) gives the parking charging and discharging power, taking into account the number of EVs and the charging rate.

Demand-Supply Balance
In the study of the basic state of the network performance, the balance between power generation and load demand at each bus should always be maintained. As DERs are added to the system, we may have:

Bus Voltage Limitations
Since the magnitude of the voltage at each bus influences the line currents, it has a great impact on network power losses. So, the magnitude and phase of the voltage should be in the desired range to guarantee the stable operation of the system, so:

Line Current Constraint
By adding DERs to the network, the current in the transmission lines will certainly increase which causes an increase in the power loss. So, it is vital to keep the current flow within the permissible range.

Pricing Constraints
In order to avoid high energy prices that will increase the costs for customers, the energy pricing should be limited to the permitted range.
Furthermore, to encourage customers to actively participate in the demand response program, Equation (40) guarantees a lower bill for each customer compared to the case that they are directly subjected to a fixed pricing method.
If τ ≤ 1, bot price-responsive loads and DSO will benefit. In this work, τ is assumed to be one.

Methodology
Here, first, the concept of GA and PSO algorithms is provided. Then the proposed hybrid GA-PSO is defined. Moreover, methods to achieve optimal energy management are described in detail. Finally, the backward-forward sweep load flow equations are provided.

GA
GA like other evolutionary optimization algorithms consists of several possible solutions (chromosomes or individuals) and takes selection, crossover, and mutation as the primary operators. The GA population is made up of a set of individuals which their merit is evaluated by a fitness function. Accordingly, the top individuals are selected for the generation of new individuals to form a new population, in which, as regards the crossover step, two selected individuals are combined to produce a new solution. Next, a mutation operator is applied to the individuals to decrease the likelihood of staying in local optimum and increase the randomness of individuals [37].

PSO
As for PSO, a swarm or population is made up of a group of agents or particles (solutions) which move through the search space. Each particle has a position and velocity vector and a memory that helps it to keep track of its previous position. Like GA, PSO has a fitness function that evaluates the particle's position. In general, the positions of the articles are distinguished as the personal best and global best in which each particle is accelerated toward them [38]. Equation (41) gives the velocity vector: where it is the iteration index, w is the coefficient of inertia, C 1 and C 2 are learning parameters, r 1 and r 2 are random values in the interval (0,1], O b and U b are the position and velocity of bth particle, respectively. Pbest b shows the best position of each particle (personal best), and Gbest b gives the best position of all the particles (global best). So: where, U it b is the updated position of the bth particle. Then, the updated position for each particle is reevaluated, if the obtained value is greater than is lower than the fitness value, then the current position becomes Pbest it−1 b .

GA-PSO Optimization Algorithm
In this paper, we propose a new algorithm that combines PSO and GA in a way that makes the new algorithm more efficient and effective. This means that the speed of the algorithm is significantly increased, while the accuracy of the response is much more improved. The property of the PSO algorithm is that it converges quickly, but near the optimum point, the search process slows down sharply. On the other hand, we know that GA is also very sensitive to the initial condition. The stochastic nature of GA operators makes the algorithm sensitive to the initial population. This dependency is such that if the initial population is not well selected, the algorithm may not converge. So, in this paper, we use the GA-PSO hybrid algorithm to obtain optimal location and capacity of DERs in a sample distribution network. The results show that the new algorithm can respond faster and find more accurate answers while its dependency on the initial condition is reduced considerably. Figure 1 represents the flowchart of the proposed optimization process using hybrid GA-PSO.
Energies 2020, 13, x FOR PEER REVIEW 10 of 26 In this paper, we propose a new algorithm that combines PSO and GA in a way that makes the new algorithm more efficient and effective. This means that the speed of the algorithm is significantly increased, while the accuracy of the response is much more improved. The property of the PSO algorithm is that it converges quickly, but near the optimum point, the search process slows down sharply. On the other hand, we know that GA is also very sensitive to the initial condition. The stochastic nature of GA operators makes the algorithm sensitive to the initial population. This dependency is such that if the initial population is not well selected, the algorithm may not converge. So, in this paper, we use the GA-PSO hybrid algorithm to obtain optimal location and capacity of DERs in a sample distribution network. The results show that the new algorithm can respond faster and find more accurate answers while its dependency on the initial condition is reduced considerably. Figure 1 represents the flowchart of the proposed optimization process using hybrid GA-PSO.

Fuzzy Membership Rule
In this method, considering that each objective has a specified value at each point of the Pareto front, all points are ranked based on their overall Fuzzy membership value γ p and point with the highest γ p is considered the best answer. We have: where γ

Demand Response Program
Demand response is one of the new developments in the field of demand-side management, which means consumer participation in improving the energy consumption pattern in smart grids [39]. Demand response can be divided into two general categories of time-of-use pricing (TOU) and incentive-based (IB) programs based on how consumers participate in changing their demand. In TOU, this partnership is in response to changes in electricity prices which can reduce costs and increase energy efficiency considerably. In this study, we use a TOU-based linear model to examine how customers operate in response to optimal electricity pricing [40]: where, (t, t) and (t, h) are self and cross-price elasticity of the demand which are supposed to be −0.1 and 0.001, respectively, and π(t) is the initial hourly energy price extracted from [41]. Since we have considered two types of domestic and industrial loads, it is not sensible to assign equal elasticities for them. So, their elasticity is defined based on their importance: IMP is the parameter assigned to the domestic and industrial loads considering their importance, which is shown in Table 4. So, the modified equation is given as follow:

ICM
Optimally scheduled ESS and EVs not only improve the power quality and voltage stability but also can mitigate the negative effects of the stochastic output of RESs. To this end, the ICM which is a Mamdani-type fuzzy inference system is applied to obtain the best charging and discharging model for ESS and EVs using input information (the price of electricity, EVs and ESS state of charge, and calculated remaining load). The capability of the fuzzy inference system to handle lots of uncertainties guarantees the optimal scheduling of all EVs and ESS charging and discharging program. Figure 2 shows the architecture of the fuzzy inference system involves four main steps.
Energies 2020, 13, x FOR PEER REVIEW 12 of 26 uncertainties guarantees the optimal scheduling of all EVs and ESS charging and discharging program. Figure 2 shows the architecture of the fuzzy inference system involves four main steps.

Set Rules
Here, the rules and conditions required to control the decision-making process are specified as (if…then) scenarios. These rules help the decision-making system to determine whether EVs and ESS should be charged or discharged. The fuzzy rules are shown in Table 5.  The Fuzzifier is responsible for converting the crisp inputs into linguistic variables by using membership functions. This means that the numbers and data that need to be processed will be converted into fuzzy sets and numbers, and prepared for processing based on fuzzy logic. There are different types of fuzzy membership functions, such as the Gaussian function, triangular function, or trapezoidal function, that can be used to convert inputs into fuzzy sets. Here, we applied the trapezoidal function as it is shown in Figure 3 for the normalized input variables:

Set Rules
Here, the rules and conditions required to control the decision-making process are specified as (if . . . then) scenarios. These rules help the decision-making system to determine whether EVs and ESS should be charged or discharged. The fuzzy rules are shown in Table 5.
The Fuzzifier is responsible for converting the crisp inputs into linguistic variables by using membership functions. This means that the numbers and data that need to be processed will be converted into fuzzy sets and numbers, and prepared for processing based on fuzzy logic. There are different types of fuzzy membership functions, such as the Gaussian function, triangular function, or trapezoidal function, that can be used to convert inputs into fuzzy sets. Here, we applied the trapezoidal function as it is shown in Figure 3 for the normalized input variables: Energies 2020, 13, x FOR PEER REVIEW 13 of 26

Inference Engine
The inference engine is responsible to compute the extent of Fuzzy inputs' compliance with the IF-THEN set rules to generate the fuzzy outputs. The rate of compliance is a number between zero and one. one means complete compliance and zero means complete incompatibility. Thus, based on the calculated compliance percentage, the aggregated fuzzy outputs are made and sent to the defuzzification step to turn into crisp outputs that define the charging and discharging model of EVs and ESS.

Defuzzifier
At this stage, the outputs of the fuzzy inference engine, which are fuzzy sets, are transformed into crisp output signals of EVs and ESS charging or discharging. In this study, the center of mass method is used for the defuzzification process. Figure 4 shows the membership function of the output variables.

Inference Engine
The inference engine is responsible to compute the extent of Fuzzy inputs' compliance with the IF-THEN set rules to generate the fuzzy outputs. The rate of compliance is a number between zero and one. one means complete compliance and zero means complete incompatibility. Thus, based on the calculated compliance percentage, the aggregated fuzzy outputs are made and sent to the defuzzification step to turn into crisp outputs that define the charging and discharging model of EVs and ESS.

Defuzzifier
At this stage, the outputs of the fuzzy inference engine, which are fuzzy sets, are transformed into crisp output signals of EVs and ESS charging or discharging. In this study, the center of mass method is used for the defuzzification process. Figure 4 shows the membership function of the output variables.

Backward-Forward Sweep Power Flow
This method is a repetition-based approach that makes use of the simple KVL (Kirchhoff's voltage law) and KCL (Kirchhoff's circuit law) rules [42] to obtain the parameters of power systems. In general, it has two stages that are presented separately below: Backward sweep:

•
Calculating the apparent power for each bus based on the input parameters; • Calculating the current of each bus using Equation (48), assuming that the voltage and phase angle at each bus is equal to one and zero, respectively; • Calculating the line currents based on Equation (49) considering the values obtained for the current of each bus moving from the end nodes to the slack bus: ( , Forward sweep: • Calculating the bus voltages according to Equation (50), taking into account the voltage drop moving from the first bus to the last bus. It has to be mentioned that for 1st bus as it is a slack bus, the voltage magnitude and phase angle are considered to be one and zero, respectively: • Controlling the convergence criteria (continue if the difference between the newly calculated value for the voltage amount and the previous one is higher than the convergence condition. Otherwise, stop the load flow calculation); • Calculating the bus currents using new values obtained for the bus voltages;

Backward-Forward Sweep Power Flow
This method is a repetition-based approach that makes use of the simple KVL (Kirchhoff's voltage law) and KCL (Kirchhoff's circuit law) rules [42] to obtain the parameters of power systems. In general, it has two stages that are presented separately below: Backward sweep: • Calculating the apparent power for each bus based on the input parameters; • Calculating the current of each bus using Equation (48), assuming that the voltage and phase angle at each bus is equal to one and zero, respectively; • Calculating the line currents based on Equation (49) considering the values obtained for the current of each bus moving from the end nodes to the slack bus: Forward sweep: • Calculating the bus voltages according to Equation (50), taking into account the voltage drop moving from the first bus to the last bus. It has to be mentioned that for 1st bus as it is a slack bus, the voltage magnitude and phase angle are considered to be one and zero, respectively: • Controlling the convergence criteria (continue if the difference between the newly calculated value for the voltage amount and the previous one is higher than the convergence condition. Otherwise, stop the load flow calculation); •

Calculating the bus currents using new values obtained for the bus voltages; •
Return to the first step of the backward sweep stage.

Sample Case Study
In this paper, the proposed algorithm has been tested on the IEEE-33 bus network which it's single line diagram is adapted from [28] and shown in Figure 5. Accordingly, the electricity supply is just carried out by the centralized power plant connected to bus 1. Simulations are performed in eight different scenarios, briefly summarized in Table 6. The results of our studies are presented below:

Sample Case Study
In this paper, the proposed algorithm has been tested on the IEEE-33 bus network which it's single line diagram is adapted from [28] and shown in Figure 5. Accordingly, the electricity supply is just carried out by the centralized power plant connected to bus 1. Simulations are performed in eight different scenarios, briefly summarized in Table 6. The results of our studies are presented below:  Figure 6, the network demand is composed of two types of domestic and industrial customers. Regarding the total system demand, despite falling sharply, it then increased to its peak (3.715 MW) at 12:00. It then experienced a period of volatility for the next 8 hours and then decreased considerably until 24:00. The figure for domestic customers fluctuated over the first 6 hours and grew significantly until 12:00, entered a period of fluctuation at about 2.5 MW from 12:00 to 16:00. Afterward, the numbers decreased sharply to under 1 MW at 24:00. Industrial section consumption pattern started from 1.796 MW, then the figure decreased to 0.859 MW at 4:00. From this point to 8:00 the consumption rate increased and experienced a period of volatility by the hour 16:00. From this point onwards, the trend increased continuously. As for network peak hours (12:00-20:00), domestic and industrial sections, have made up 64.4% and 36.6% of the total system demand, respectively.   Figure 6, the network demand is composed of two types of domestic and industrial customers. Regarding the total system demand, despite falling sharply, it then increased to its peak (3.715 MW) at 12:00. It then experienced a period of volatility for the next 8 hours and then decreased considerably until 24:00. The figure for domestic customers fluctuated over the first 6 hours and grew significantly until 12:00, entered a period of fluctuation at about 2.5 MW from 12:00 to 16:00. Afterward, the numbers decreased sharply to under 1 MW at 24:00. Industrial section consumption pattern started from 1.796 MW, then the figure decreased to 0.859 MW at 4:00. From this point to 8:00 the consumption rate increased and experienced a period of volatility by the hour 16:00. From this point onwards, the trend increased continuously. As for network peak hours (12:00-20:00), domestic and industrial sections, have made up 64.4% and 36.6% of the total system demand, respectively. Table 7 shows the optimal location and capacity of DERs obtained from the GA-PSO for different scenarios. As it is obvious, the simultaneous presence of RESs and ESSs have provided conditions to increase the EVs penetration to the network. This development is occurred when the voltage deviation has not increased, resulting in cost saving. According to Table 8, the combined utilization of DERs and the implementation of the ICM have led to increased computation time. This is because of the complexity of the system imposed by the uncertainties from EV, ESS, and RES models. Accordingly, the presence of EV modeling in simulations has by far increased the processing time more than the two others, due to the consideration of probabilistic factors such as their mileage, arrival or departure time and their SOC in EV modeling. RES has the second-highest impact on processing time, followed by ESS so that they have increased the computation time by 67 and 43 seconds, respectively, compared to the time for the base case. As for technical issues, the simultaneous presence of ESSs and EV parking lots has enabled the production of RESs to be distributed through different hours, so the power losses and voltage deviations are decreased. Furthermore, considering EV as a controllable load and applying demand response program resulted in a further reduction in costs, losses, and voltage deviation. So, in scenario 8, with the combined utilization of DERs and scheduled charging and discharging of ESS and EVs, the f 1 , f 2 and f 3 are improved with an amount of 51%, 40.77%, and 55.21%, respectively, compared to the base case. The network demand curve for scenario 8 is shown in Figure 7:   Table 7 shows the optimal location and capacity of DERs obtained from the GA-PSO for different scenarios. As it is obvious, the simultaneous presence of RESs and ESSs have provided conditions to increase the EVs penetration to the network. This development is occurred when the voltage deviation has not increased, resulting in cost saving. According to Table 8, the combined utilization of DERs and the implementation of the ICM have led to increased computation time. This is because of the complexity of the system imposed by the uncertainties from EV, ESS, and RES models. Accordingly, the presence of EV modeling in simulations has by far increased the processing time more than the two others, due to the consideration of probabilistic factors such as their mileage, arrival or departure time and their SOC in EV modeling. RES has the second-highest impact on processing time, followed by ESS so that they have increased the computation time by 67 and 43 seconds, respectively, compared to the time for the base case. As for technical issues, the simultaneous presence of ESSs and EV parking lots has enabled the production of RESs to be distributed through different hours, so the power losses and voltage deviations are decreased. Furthermore, considering EV as a controllable load and applying demand response program resulted in a further reduction in        Figure 8 gives the hourly network operational strategy along with the network demand profile in scenario 8. According to Figure 8, the highest system demand occurred at 12:00, in which 54.3% of its amount is provided by resources other than the centralized power plant. Thus, there is not only a great reduction in system dependency on the centralized power plant but also a suitable condition to decrease the network operation costs in peak hours. As it is obvious, EV charging has been carried out in the time-period of 22:00-09:00, which is the network's low load hours and low energy prices according to the ICM. On the contrary, EVs are discharged in the time-period of 10:00-21:00, which is the peak of network consumption with high energy prices. This process has been done according to the ICM for more profitability for car owners. Consequently, in comparison with Figure 7, the difference between the maximum and minimum value for each trend in Figure 7 has been decreased, which considerably moderates the demand curve.
The share of each resource in supplying the total system demand for 24-hours is presented in Table 9. The results highlight the potency of our proposed method to decrease the share of the centralized power plant in demand supplying.
according to the ICM. On the contrary, EVs are discharged in the time-period of 10:00-21:00, which is the peak of network consumption with high energy prices. This process has been done according to the ICM for more profitability for car owners. Consequently, in comparison with Figure 7, the difference between the maximum and minimum value for each trend in Figure 7 has been decreased, which considerably moderates the demand curve. The share of each resource in supplying the total system demand for 24-hours is presented in Table 9. The results highlight the potency of our proposed method to decrease the share of the centralized power plant in demand supplying.   According to Table 9, the deployment of EVs and ESSs to the network resulted in an increased share of RESs in supplying the customers' demand. So, the reduction in dependency on centralized power will reduce the DSO's costs and increase its profit, Table 10. In particular, there is no longer a need to purchase all the required power from the centralized power plant to supply demand, especially during peak hours. As for Table 10, overall, RESs had by far the greatest impact on DSO's profit. As it is clear, in scenarios 2, 4 and 6 DSO experienced high incomes where the RESs were utilized to supply customers. Results justify the uncertainties in RESs production. Furthermore, EVs with V2G capability came in second place given their impact on DSO's profit. The third effective factor, ESSs, had a negligible effect on DSO's profit because they had a lower contribution in power supplying compare to the two others.
Obtaining optimum location and size of DERs and scheduling ESS and EVs operation have influenced the power system parameters, e.g., the bus voltages are improved. Figure 9 gives the average voltage magnitude for each bus over a 24-hour time. Accordingly, the maximum deviation from the desired value of 1 per-unit for each bus has occurred in the base case scenario, in the absence of DERs. With respect to bus number 33, the farthest point from the centralized power plant, the best number is reported in scenario 8 due to the integration of DERs in the grid. Regarding total deviation, the smallest enhancement can be seen in the third scenario. This is because the capacity of ESS is limited and these devices are considered as spinning reserve, not voltage regulators. So, to achieve the best result, the combination of RESs, ESSs, and EV parking lots along with the implementation of the ICM (scenario 8) is the best scenario.  Furthermore, to independently study the effect of time of use pricing on system operation, Figure 10 compares statistics regarding hourly system demand extracted from the base case, scenario 8 with fixed pricing, and scenario 8 with the time of use pricing method. Generally, it can be seen that, as the demand response program is implemented, a part of customers has reduced their consumption and also shifted part of their demand to low load hours. Furthermore, to independently study the effect of time of use pricing on system operation, Figure 10 compares statistics regarding hourly system demand extracted from the base case, scenario 8 with fixed pricing, and scenario 8 with the time of use pricing method. Generally, it can be seen that, as the demand response program is implemented, a part of customers has reduced their consumption and also shifted part of their demand to low load hours. Table 11 provides detailed information regarding Figure 10: Furthermore, to independently study the effect of time of use pricing on system operation, Figure 10 compares statistics regarding hourly system demand extracted from the base case, scenario 8 with fixed pricing, and scenario 8 with the time of use pricing method. Generally, it can be seen that, as the demand response program is implemented, a part of customers has reduced their consumption and also shifted part of their demand to low load hours. Overall, as it is clear, all technical indicators are improved after applying demand-side management program. Therefore, it ensures the reliable operation of the system and also increases the system operating efficiency.
In order to investigate the effectiveness of the proposed algorithm, Table 12 provides a comparison between our proposed method with some other algorithms provided by literature to deal with the case defined in scenario 8. In order to compare the computation speed, the number of function evaluation (NOFE) index is defined, in which the lower number of NOFE, the higher speed of the algorithm. minimize the multi-objective optimization problem consists of three techno-economical parts: power losses, voltage fluctuations, and demand supplying costs. Through the outer layer, the simultaneous determination of the optimal capacity and location of DERs is accomplished based on the probabilistic models. The inner layer corresponds to schedule the charging and discharging of EVs and ESSs by using the fuzzy logic-based ICM. The formulated objective function is solved by using the GA-PSO algorithm and the Fuzzy membership-based approach is applied to derive the optimal solution from the Pareto frontier. To show the efficacy of the proposed model, the results from an IEEE 33-bus network in eight different scenarios were presented and discussed.
The given results indicated that optimized penetration of DERs into the distribution network improves the system operation indices (e.g., voltage deviation in sensitive buses). Applying the ICM to schedule the EVs and ESSs charging, has decreased the voltage fluctuations and power losses dramatically. The proposed method also enabled new functionalities for RESs, e.g., they can operate as distributed generators. This feature gives RESs the ability to supply more demand for the network along with the needs of EV batteries, which can greatly decrease the costs for DSO and customers as well. Furthermore, the proposed demand-side management model has modified the network demand curve and reduced costs significantly. Further, the utilization of the proposed Fuzzy membership-based method for solving the optimization problem resulted in a more accurate and efficient answer compare to other solving methods.
Future works can focus on the deployment of various DERs in microgrids. As we proposed a comprehensive model that optimizes energy management in smart grids with non-conventional energy resources integration, hourly updated information of uncertainties can be deployed to increase the accuracy of the proposed model. Further, the effects of different DERs, such as micro-turbines and diesel generators can be studied on the power system stability and reliability over larger time frames (weekly and yearly).