Multi-Objective Energy Management of a Micro-Grid Considering Stochastic Nature of Load and Renewable Energy Resources

Optimal inclusion of a photovoltaic system and wind energy resources in electrical grids is a strenuous task due to the continuous variation of their output powers and stochastic nature. Thus, it is mandatory to consider the variations of the Renewable energy resources (RERs) for efficient energy management in the electric system. The aim of the paper is to solve the energy management of a micro-grid (MG) connected to the main power system considering the variations of load demand, photovoltaic (PV), and wind turbine (WT) under deterministic and probabilistic conditions. The energy management problem is solved using an efficient algorithm, namely equilibrium optimizer (EO), for a multi-objective function which includes cost minimization, voltage profile improvement, and voltage stability improvement. The simulation results reveal that the optimal installation of a grid-connected PV unit and WT can considerably reduce the total cost and enhance system performance. In addition to that, EO is superior to both whale optimization algorithm (WOA) and sine cosine algorithm (SCA) in terms of the reported objective function.


Introduction
Load demand is increasing rapidly and the growth of energy will increase by 40% from 2006 to 2030 [1]. The growing energy demand, the increase in its price, and the increasing pollution worldwide are considered large problems that need unusual solutions. To overcome these problems, it is necessary to search for innovative solutions using renewable resources and energy management of the energy systems. Energy management means reducing the operating, maintenance, and generation costs of the system and enhancing system performance with methods such as power loss reduction and stability enhancement and alleviating the harmful emissions to the environment. Thus, the energy management of a micro-grid has become one of the most vital aspects of the power or energy system all over the world [2]. The optimal energy management of a micro-grid can be accomplished by considering or managing the consumption, load profile, price of energy, energy sources, cost of sources installation, source operation, construction, and optimal installation of the renewable distributed generators (DGs) [3].
The authors in [4] solved the energy management of a microgrid consisting of photovoltaic (PV), wind turbine (WT), and electrical storage system for a multi-objective function that includes the cost of energy, lifecycle cost, and the annual cost of load loss in addition

•
The energy management problem of a MG is nonlinear, nonconvex, and is not an easy task. Thus, selection of an efficient method or optimization technique for solving this problem is a crucial task.

•
Most of the presented efforts solved the energy management problem at the deterministic conditions where the uncertainties of the renewable energy resources and the load demands were not considered. • Due to the intermediacy and continuous variations of RERs' powers leading to increasing uncertainties of system, the energy management problem solution has become more complex and the uncertainties of these resources should be modeled efficiently to be embedded in the energy management problem solution. • Some papers solved the energy management for enhancing the system performance only and some papers solve the energy management from an economic perspective only. However, very few papers take into consideration the system performance and the economic benefits of RERs simultaneously.
In this paper, the EO technique is employed to solve energy management of a MG by incorporating renewable distributed generators with and without considering the uncertainties of the system. The main contributions of the paper are as follows: • Solving the energy management of a MG with integration of RERs under deterministic and probabilistic conditions. • Application of EO technique as one of the most recent algorithms for solving the energy management problem.

•
Assigning the optimal ratings and placement of a solar PV unit and WT to enhance the system's performance and reduce the total cost. • Comparing the performance of the proposed algorithm for solving the reported problem with well-known techniques. • An investigation is carried out to study the impact of optimization of the energy management of MG with the inclusion of the RERs.
The paper is arranged as follows: Section 2 defines the problem formulation, the system constraints, and the modeling of the RERs. Section 3 describes the methodology of uncertainty modeling. Section 4 describes the procedure of the EO and its application for solving energy management. The simulation results and the conclusions are listed in Sections 5 and 6, respectively.

Problem Formulation
In this study, three objective functions are considered in a multi-objective function for energy management of the micro-grid with satisfying the MG constraints, which can be formulated as follows: 2.1. The Objective Function 2.1. 1

. The Cost Reduction
The total annual cost is considered, which includes the annual energy loss cost (Co loss ), the cost of purchasing electric energy from the main substation (Co Grid ), PV units cost (Co PV ), and WT cost (Co WT ), and it can be represented as follows: Co = min(Co loss + Co Grid + Co PV + Co WT ) (1) Electronics 2021, 10, 403 4 of 22 The detailed items of Equation (1) are defined as follow: where K Grid is the purchasing energy cost from the grid, K Loss is the energy loss cost, K O&M PV is the operation and maintenance costs of the PV unit, Co O&M WT is the operation and maintenance costs of the wind turbine, Cost inst.
PV is the installation cost of the PV unit, Cost inst.
WT is the installation cost of the WT, K PV is the purchasing cost of the PV unit ($/kW), K WT is the purchasing cost of the WT ($/kW), β PV,WT is the interest rate of capital investment of the installed PV or WT, NP PV,WT is the lifetime of the PV unit or the WT, CF the capital recovery factor, P PV is the hourly output power of the PV system, P wr is the rated power of the WT, and P sr is the rated power of the PV unit. The output powers of the PV units and the WT are calculated using (11) and (12) as following [33]: where G s denotes the solar irradiance; G std represents the standard environment solar irradiance, which equals 1000 W/m 2 ; X c denotes a certain irradiance point, which equals 120.
where ω r denotes the rated wind speed; ω o denotes the cut-out wind speed; ω i denotes the cut-in wind speed. The performance of the system can be enhanced by minimizing the voltage deviations, which can be described as follows: where V n is the voltage of the n th bus; and NB denotes the number of buses in the grid.

Voltage Stability Enhancement
The third objective function is stability enhancement, which can be specified by maximizing the voltage stability index (VSI), which can be described as follows [34]: where R nm and X nm are the resistance and reactance of the transmission line between buses m and n, respectively; P n and Q n are the injective active and reactive power, respectively, at bus n. The considered objective function is a multi-objective function which can be described as follows: RERs subscript denotes the inclusion of RERs to the system, while the Base subscript denotes the base case or without the RERs. The selected values of the W 1 , W 2 , and W 3 are 0.5, 0.25, and 0.25, respectively [35].

Inequality Constraints
PF min ≤ PF ≤ PF max (22) I n ≤ I max,n n = 1, 2, 3 . . . , NT where V min is the minimum limit of the voltage while V max is the maximum voltage limit. P D and Q D denote the active and reactive demand, respectively; I max,n is the maximum current at the n-th branch; PF min and PF max are the minimum and maximum limits of the WT power factor, respectively; NT denotes the number of TL.
where P S and Q S are the active and reactive powers of the mean upstream substation, respectively.

Uncertainty Modeling
Here, the modeling of the uncertainty for the solar irradiance, wind speed, and load demand is explained. The generation of the probabilistic models for a unit of PV and WT as well as the load demand was based on the hourly historical data of the location under research. Three years of hourly historical data for wind speed, solar irradiance, and load demand have been considered in this work. The three years are represented by a day throughout these years (24 h). The probability distribution function (pdf) of each time segment can be achieved using the data associated with the same hours of the day. Consequently, each time segment has 1095 solar irradiance, wind speed, and load demand (3 years × 365 days per year), generating the equivalent hourly pdfs. The probabilistic model of the PV system, WT, and load demand can be given as follows.

Solar Irradiance Modeling
A beta pdf for each hour was generated by utilizing the solar irradiance data of that hour and can be mathematically described as follows [36,37]: where f b (g s ) and Γ represent the beta pdf of the solar irradiance and the gamma function, respectively; the beta parameters for each period are denoted by α and β. The historical data can be used to determine these parameters as follows [38,39]: where the mean and standard deviation of the solar irradiance for each time segment are denoted by µ and σ, respectively. The continuous beta pdfs are split into many segments in which each individual segment creates a mean value and a probability of happening. The probability of happening for a segment during a specific hour can be described by: where the start and endpoints of the interval i are denoted by g s,i and g s,i+1 , respectively. prob g s i is the probability happening of the interval i. Based on the generated beta pdf of the solar irradiance of a time segment, the output power PV for this time period's states can be calculated using (11).

Wind Speed Modeling
The power generated by a WT depends on the value of the wind speed and the turbine's characteristics. The wind speed is frequently modeled by using Weibull pdf with shape parameter equalling 2 [33,40], and it is called Rayleigh pdf [41]. Hence, here, the historical data of hourly wind speeds were utilized to create the Rayleigh pdfs ( f t r (v)) for each time segment, which could be computed as follows: where the wind speed is denoted by v, while c is the scale parameter of Rayleigh. Like solar irradiance, the continuous pdfs were split into many segments in which each segment generated a mean value and a probability of happening. Therefore, the probability of each segment could be determined as follows: where the wind speed limits of the segment i denoted by v w1 and v w2 ; prob v i denotes the happening probability of state i. Based on the WT characteristics, the wind speed can be converted into the wind generation system's output power based on (12).

Load Demand Modeling
Due to the uncertainty of the load demand, a normal pdf is utilized for modeling the demand. The normal pdf of the uncertain load demand can be determined using the following formula [39]: where the normal pdf of the demand is denoted by f n (l); the mean and standard deviation of the load demand are defined, respectively, by µ l and σ l . The probability happening of a segment can be described by: where the starting and ending points are denoted by l i and l i+1 of the interval i. prob l i is the probability happening of interval i.

Combined Model of Wind, PV, and Load
The probabilistic models of the wind speed, solar irradiance and load demand are employed for generating a combined probability model (P com,i ) of wind-PV-load. The combined model of the interval I, each time segment, can be calculated by convolving the probabilities of the wind speed, solar irradiance, and load demand, as follows: Each time segment, the objective function given in (1) should be calculated and weighted according to the combined probability model (30). In this work, each time segment was represented by one hour. This implies that, for each time period, each variable had several states. However, for the sake of simplicity, only the expected values of the variables are given.

Equilibrium Optimizer
The equilibrium optimizer (EO) is a developed optimization algorithm that mimics the control volume forms' mass balance to assign the dynamic and equilibrium states. In the EO, the concentrations represent the search agents or the optimization algorithm populations where the concentrations update their locations around equilibrium candidates. The mass balanced equation is formulated as follows: where V is the control volume, X is the concentration, and Q the flow rate. The integration and manipulating of the Equation (35), it can be represented as follows: where λ = Q V . X 0 denotes the initial concentration while t 0 refers to the initial start time. The following steps describe the procedure of the EO: Step 1: Initialization The concentrations are initialized randomly as follows: where X max refers to the maximum limit of the control variables while X min is the minimum limit. rand i is a random variable within [0, 1]. Then, evaluate the objective function for each concentration.
Step 2: Assigning the Equilibrium candidates The populations are sorting and the four best solutions are captured and their average value to form the pool vector (X pool ) as follows: Step 3: The concentration updating. Two randomly vectors (r, λ) are generated randomly and utilized to adjust an exponential factor (F) for updating the concentrations as follows: where where a 1 and a 2 refer to constant terms, which are set to be 2 and 1, respectively, to adjust the exponential factor. T Max is the maximum iteration number, and T denotes the T-th iteration. It should be indicated here that a 1 is utilized to controls the exploration phase of the EO and a 2 is utilized to control the exploitation process of the EO. Sign (r − 0.5) controls the direction of the exploration.
Step 4: Concentration updating based on the generation rate.
The generation rate is an efficient method to enhance the exploitation phase of the optimization algorithm as follows: where, where r 1 and r 2 are random numbers within the range [0, 1]. GP denotes the generation probability to control the participation probability of concentration, which is updated by the generation rate. If GP = 1 generation rate will not participate in the optimization process. If GP = 0, the generation rate will participate in the process. GP = 0.5 provides an excellent balancing between exploitation and exploration phases. Referring to the previous steps, the updated equation of the EO is formulated as follows: Step 5: Adding memory saving. In this step, the obtained concentration is compared with the previous concentration, and it will be accepted if this value is enhanced. Figure 1 shows the flow chart of optimal energy management.

Simulation Results
In this section, the proposed EO algorithm is applied to solve the energy management of the micro-grid and optimize the sizing and location of the renewable-based DGs, in-

Simulation Results
In this section, the proposed EO algorithm is applied to solve the energy management of the micro-grid and optimize the sizing and location of the renewable-based DGs, including PV and WT, with and without considering the uncertainty. The captured results are then compared with whale optimization algorithm (WOA) and sine cosine algorithm (SCA) techniques for verifying the effectiveness of the proposed method. The proposed algorithm is applied to the 12-bus system, and its single is depicted in Figure 2. The bus and line data are listed in Appendix A. The system specifications and the initial load flow at 100% loading are shown in Table 1. The proposed method for optimal energy management was written in MATLAB software (MATLAB 2014) on 2.5 GHz core I5 with 4 GB PC. The cost coefficients and the system constraints are tabulated in Table 2. The EO, WOA, and SCA selected parameters for all studied cases are listed in Table 3. Two studied cases are presented for the energy management with and without considering the uncertainties of the system as follows:

Scenario#1: Energy management under deterministic conditions
In this case, the proposed algorithm has been applied to solve energy management by considering the variations of the load demand, the wind speed, the solar irradiance, and the market price at deterministic conditions. The hourly load profile is shown in Figure 3. The hourly solar irradiance and the wind speed are depicted in Figures 4 and 5, respectively [44]. The time-varying market price is shown in Figure 6 [45]. Table 4 shows the simulation results for this case by application EO, WOA, and SCA. Without incorporating the RERs, the total cost, the summation of the voltage deviations, and the stability index are 8.56007 × 10 5 $, 7.94398 p.u., and 2.33983 × 10 2 p.u., respectively. The voltage profile without incorporating the RERs is shown in Figure 7a. The voltage decreases with increasing the load demand during the day ahead and the minimum voltage magnitude occurs at the 12th bus.
Judging from Table 4, the obtained results by applying the EO are better than SCA and the WOA in terms of the considered objective functions. By optimal integration of RERs in the MG using EO, the power total cost is reduced to 4.27794 × 10 5 $, the summation of the voltage deviations is reduced to 3.3260 p.u. and the summation of the voltage stability index is enhanced to 2.515199 × 10 2 p.u. The optimal sizes and placement of the PV and WT are listed in Table 4. The voltage profiles for this case are depicted in Figure 8. It is clear that the voltage profiles are enhanced considerably with the optimal integration of the RERs.
Furthermore, the power losses are reduced considerably with the inclusion of the RERs as depicted in Figure 8, while the system's stability is significantly enhanced as illustrated in Figure 9. The output powers for the solar PV unit and WT are depicted in Figure 10. According to Figure 10, the output power of the PV unit follows the variations of the solar irradiance, while the yielded power by the WT follows the wind speed variations. The objective function trends with the application of EO, WOA, and SCA are depicted in Figure 11. Referring to this figure, it is evident that EO has a stable convergence characteristic where it converged at the 27th iteration.

oiranecS#1: Energy management under deterministic conditions
In this case, the proposed algorithm has been applied to solve energy management by considering the variations of the load demand, the wind speed, the solar irradiance, and the market price at deterministic conditions. The hourly load profile is shown in Figure 3. The hourly solar irradiance and the wind speed are depicted in Figures 4 and 5, respectively [44]. The time-varying market price is shown in Figure 6 [45]. Table 4 shows the simulation results for this case by application EO, WOA, and SCA. Without incorporating the RERs, the total cost, the summation of the voltage deviations, and the stability index are 8.56007 × 10 5 $, 7.94398 p.u., and 2.33983×10 2 p.u., respectively. The voltage profile without incorporating the RERs is shown in Figure 7a. The voltage decreases with increasing the load demand during the day ahead and the minimum voltage magnitude occurs at the 12th bus.
Judging from Table 4, the obtained results by applying the EO are better than SCA and the WOA in terms of the considered objective functions. By optimal integration of RERs in the MG using EO, the power total cost is reduced to 4.27794 × 10 5 $, the summation of the voltage deviations is reduced to 3.3260 p.u. and the summation of the voltage stability index is enhanced to 2.515199 × 10 2 p.u. The optimal sizes and placement of the PV and WT are listed in Table 4. The voltage profiles for this case are depicted in Figure 8. It is clear that the voltage profiles are enhanced considerably with the optimal integration of the RERs.
Furthermore, the power losses are reduced considerably with the inclusion of the RERs as depicted in Figure 8, while the system's stability is significantly enhanced as illustrated in Figure 9. The output powers for the solar PV unit and WT are depicted in Figure 10. According to Figure 10, the output power of the PV unit follows the variations of the solar irradiance, while the yielded power by the WT follows the wind speed variations. The objective function trends with the application of EO, WOA, and SCA are depicted in Figure 11. Referring to this figure, it is evident that EO has a stable convergence characteristic where it converged at the 27th iteration.

oiranecS#2: Energy management under probabilistic conditions
In this section, the MG's energy management is solved under probabilistic conditions where the uncertainties of the load demand, wind speed, and solar irradiance have been considered. Three years of hourly historical data of load demand, solar irradiance, and wind speed have been considered in this paper. The obtained load profile, solar irradi ance, and the wind speed are depicted in Figures 12-14, respectively. Table 5 shows the captured results for optimal energy management by application the EO technique with and without inclusion RERs. Without integrating the RERs under the uncertainties of load demand, the total cost, summation of the voltage deviations, and the stability index are 8.87522 × 10 5 $, 8.57474 p.u., and 2.31695 × 10 2 p.u., respectively. With optimal integration of the RERs, the total cost and summation of the voltage deviations is reduced to 4.76101×10 5 $ 4.15795 p.u.; at the same time, the summation of the voltage stability index is improved to be 2.49093 × 10 2 p.u. The optimal location and rating of the PV and WT are also listed in Table 5. Figure 15 shows the voltage profile with and without the inclusion RERs. Judging from this figure, the voltage profile is enhanced by optimal energy man agement with RERs.
Furthermore, the power loss is reduced considerably with the inclusion of the RERs as depicted in Figure 16. In addition, the voltage stability index also improved during the day ahead, according to Figure 17. The output powers of the PV and WT at probabilistic conditions are depicted in Figure 18. The output power of the PV unit is varied with the variation of the forecasting of the solar irradiance, while the output power of the WT fol lows the forecasting of the wind speed.

Scenario#2: Energy management under probabilistic conditions
In this section, the MG's energy management is solved under probabilistic conditions where the uncertainties of the load demand, wind speed, and solar irradiance have been considered. Three years of hourly historical data of load demand, solar irradiance, and wind speed have been considered in this paper. The obtained load profile, solar irradiance, and the wind speed are depicted in Figures 12-14, respectively. Table 5 shows the captured results for optimal energy management by application the EO technique with and without inclusion RERs. Without integrating the RERs under the uncertainties of load demand, the total cost, summation of the voltage deviations, and the stability index are 8.87522 × 10 5 $, 8.57474 p.u., and 2.31695 × 10 2 p.u., respectively. With optimal integration of the RERs, the total cost and summation of the voltage deviations is reduced to 4.76101×10 5 $ 4.15795 p.u.; at the same time, the summation of the voltage stability index is improved to be 2.49093 × 10 2 p.u. The optimal location and rating of the PV and WT are also listed in Table 5. Figure 15 shows the voltage profile with and without the inclusion RERs. Judging from this figure, the voltage profile is enhanced by optimal energy management with RERs.
Furthermore, the power loss is reduced considerably with the inclusion of the RERs as depicted in Figure 16. In addition, the voltage stability index also improved during the day ahead, according to Figure 17. The output powers of the PV and WT at probabilistic conditions are depicted in Figure 18. The output power of the PV unit is varied with the variation of the forecasting of the solar irradiance, while the output power of the WT follows the forecasting of the wind speed.

oiranecS#2: Energy management under probabilistic conditions
In this section, the MG's energy management is solved under probabilistic conditions where the uncertainties of the load demand, wind speed, and solar irradiance have been considered. Three years of hourly historical data of load demand, solar irradiance, and wind speed have been considered in this paper. The obtained load profile, solar irradiance, and the wind speed are depicted in Figures 12-14, respectively. Table 5 shows the captured results for optimal energy management by application the EO technique with and without inclusion RERs. Without integrating the RERs under the uncertainties of load demand, the total cost, summation of the voltage deviations, and the stability index are 8.87522 × 10 5 $, 8.57474 p.u., and 2.31695 × 10 2 p.u., respectively. With optimal integration of the RERs, the total cost and summation of the voltage deviations is reduced to 4.76101×10 5 $ 4.15795 p.u.; at the same time, the summation of the voltage stability index is improved to be 2.49093 × 10 2 p.u. The optimal location and rating of the PV and WT are also listed in Table 5. Figure 15 shows the voltage profile with and without the inclusion RERs. Judging from this figure, the voltage profile is enhanced by optimal energy management with RERs.
Furthermore, the power loss is reduced considerably with the inclusion of the RERs as depicted in Figure 16. In addition, the voltage stability index also improved during the day ahead, according to Figure 17. The output powers of the PV and WT at probabilistic conditions are depicted in Figure 18. The output power of the PV unit is varied with the variation of the forecasting of the solar irradiance, while the output power of the WT follows the forecasting of the wind speed.

Conclusions
In this paper, micro-grid's energy management problem has been solved with the optimal integration of solar PV and wind turbine. An efficient optimization technique known as equilibrium optimizer (EO) has been applied considering the variations of load demand, wind speed, solar irradiance, and market price under deterministic and probabilistic conditions. The proposed algorithm for energy management has been validated

Conclusions
In this paper, micro-grid's energy management problem has been solved with the optimal integration of solar PV and wind turbine. An efficient optimization technique known as equilibrium optimizer (EO) has been applied considering the variations of load demand, wind speed, solar irradiance, and market price under deterministic and probabilistic conditions. The proposed algorithm for energy management has been validated on 12 bus micro-grid systems for cost reduction, voltage profile, and stability improvement simultaneously. The obtained results by EO have been compared with two optimization techniques (WOA, SCA). The paper's conclusions can be summarized as follows:

•
The proposed EO algorithm is an effective algorithm for solving the energy management problem of MG under deterministic and probabilistic conditions. • The proposed EO algorithm has been successfully assigned the optimal locations and ratings of the RERs for optimal energy management.

•
Under the deterministic condition, solving the energy management with optimal integration of the RERs can reduce the total cost and decrease the voltage deviations by 50.02% and 58.13%, respectively. At the same time, summation the voltage stability index is enhanced by 7.4949%.

•
Under the probabilistic condition, solving the energy management with optimal integration of the RERs can reduce the total cost and decrease the voltage deviations by 46.36% and 51.51%, respectively. At the same time, summation the voltage stability index is enhanced by 7.51%.

•
The proposed EO algorithm has stable convergence characteristics and it is superior for solving the MG's energy management compared with SCA and WOA.

•
The obtained results by application of the EO are better than compared with the reported algorithms in terms of the considered objective function where the total cost has been reduced by 4.746% and 1.460% compared with WOA and SCA, respectively.
in addition of that ∑ VD has been minimized by 5.315% and 12.717% compared with WOA and SCA while ∑ VSI has been enhance by 0.3813% and 0.8746% compared with WOA and SCA, respectively.

Conflicts of Interest:
The authors declare no conflict of interest. Multi-objective function f 1 The objective function representing the active total power losses f 2

Nomenclature
The objective function representing total voltage drop f 3 The objective function representing the overall voltage stability index K Grid Purchasing energy cost from the grid K Loss Energy loss cost K O&M

PV
The operation and maintenance costs of the PV unit K WT The purchasing cost of the WT K PV The purchasing cost of the PV Appendix A