2. Literature Review
Microgrids are small-sized power systems. Microgrids are intended and constructed to provide electrical energy to clients linked to them. Microgrids could be isolated or connected to the grid [
1]. The microgrid can exchange energy if it is attached to the main grid by importing and exporting it to the main grid. Microgrid characteristics include distributed generators, renewable energy sources, storage devices, and controllable loads [
2]. These characteristics make microgrids more flexible, reliable and effective [
3].
Figure 1 shows the distinctions between centralized systems and microgrids. There are other reasons for setting up microgrids; they reduce the cost of manufacturing, maintenance and operation, increase efficiency, reduce emissions, and improve energy quality [
4]. Uncentralism implies an enhanced microgrid’s reliability and accessibility owing to distributed generators. Microgrids are usually incorporated and linked to renewable sources of energy. These sources are capable of making the system more economical than centralized systems based on standard generators. The operating cost decreases enormously when renewable energy sources are integrated with a microgrid. This is because the renewable power sources’ operating expenses are negligible compared to standard generators which depend on fuel expenses for their operating costs.
Renewable power is freely accessible, but it requires investment costs to transform renewable energy to electricity. The authors in [
6] review renewable distributed generation unit integration techniques and methods in a distribution system. A storage system is one of the other significant parts that might be attached to a microgrid. There are many storage technologies that are quickly improving, and in microgrids there are many applications of them [
7]. One of the significant applications, for example, is their contribution to supporting an emergency load. An ESS can also supply peaks with electrical energy [
8].
The ESSs make electricity operation more economical and reduce expenses such as renewable energy sources. In addition, during low-price periods, electrical energy can be charged and stored. Moreover, during high-price periods they are able to discharge and supply the stored energy [
1]. This method therefore leads to a more economic system that is less expensive to operate. Improve and boost the efficiency, reliability and accessibility of renewable energy sources and ESSs [
9].
In addition, the Smart Energy Management System (SEMS) is a system used in a microgrid to coordinate various parts and devices [
10]. These elements include renewable sources of electricity and ESSs. The SEMS has some goals and its main goal is to produce and create suitable set points for distinct sources and ESSs in order to minimize expenses and optimize energy dispatch or power distribution economically. A typical SEMS is shown in
Figure 2 [
11]. The authors in [
12] propose a method for optimal dispatch of a microgrid that has ESSs.
Smart grids are a intelligent form of microgrids and are bi-directional energy and communication networks that enhance an electrical system’s reliability. They have all the phases observed in an electrical system and generation, transmission and distribution are those phases. They also have ESSs that considerably boost the efficiency of a power system. An ESS also reduces the total operating cost of a smart grid and saves a big part of the cost of fuel and maintenance [
13]. Smart grids could be small-scale or large-scale systems. In addition, smart grids are green and generate much less emissions than traditional power systems.
Electric vehicles are regarded as ESSs. Like other ESSs, they charge and discharge. Before incorporating them into a microgrid, ESSs should be optimally sized [
8]. Many methods are available to discover an ESS’ ideal size. The optimum size of the ESS is when this size minimizes the total investment and operating costs. Furthermore, the expenses and profits of exchanged energy are included in the total cost of in grid-connected microgrids [
3]. There is a mathematical relationship between the size of an ESS and its cost of investment and its cost of operating microgrid. As the size rises, the investment cost increases linearly. However, as the size rises, the operation cost reduces exponentially [
1]. The total cost is the sum of those two expenses. The goal is to calculate the size at the minimum total cost [
14]. This connection is illustrated in
Figure 3. The ESS should be at its optimum size because an over-sized ESS results in elevated investment costs whereas an undersized ESS may not be able to provide financial and operational advantages [
1]. The authors in [
15] suggest an ESS methodology for future autonomous systems to be optimally sized.
One of the optimization techniques is used to calculate the ideal size of an ESS. Some of these methods are mixed-integer linear programming (MILP) [
8], mixed-integer non-linear programming (MINLP) [
16], dynamic programming (DP) [
17,
18], particle swarm optimization (PSO) [
19], two-stage stochastic programming [
20], distributionally robust optimization [
21], model predictive control (MPC) [
22]. The optimization problems parameters may be either certain or uncertain. Deterministic methods of optimization are used with certain parameters to solve problems of optimization, while probabilistic methods are used to solve problems with unclear parameters. In addition, there are several algorithms to find the ideal size of an ESS in relation to optimization methods. A method has been suggested by the authors in [
23] to optimally size a hybrid ESS (HESS). This HESS comprises of batteries and ultracapacitors that are rechargeable. In addition, the authors provided a methodology to optimize the joint ability of renewable energy and an HESS in [
24].
Stochastic optimization or robust optimization are used to solve problems of optimization with uncertainty in their parameters [
20]. Furthermore, the heuristic algorithm is also used to solve problems of probabilistic optimization. This algorithm and one of its applications in power system optimization were described by the authors in [
25]. They used the algorithm to find in a microgrid the optimal functioning of distributed generators. In addition, the authors in [
8] suggested an algorithm to optimally size a battery ESS (BESS) in an isolated microgrid. This algorithm’s goal is to discover the BESS size that minimizes the total cost. This algorithm is described in [
8] in details.
Figure 4 briefly demonstrates this method and algorithm and how it is used to size the BESS optimally.
The ESS is one of the very appealing alternatives for enhancing and improving microgrid scheduling and operation flexibility. This is because an ESS can also absorb energy when prices are low or excessive generation occurs. After that, when prices are high or when electricity is low, it returns this energy [
26]. There are many technologies available for ESSs. Some of these techniques include superconductive magnetic energy storage (SMES) [
27], compressed air storage (CAES) [
28], supercapacitor energy storage [
29], pumped hydro storage [
30], battery energy storage (BESS) [
31], flywheel energy storage [
32], and gas storage process [
33]. In [
34], more ESS technologies are evaluated and analyzed.
Different objective features associated with an ESS are used in power system optimization [
26]. Some of them compensate for grid voltage changes [
27] and overcome the destabilizing impact of instant steady energy loads in DC microgrids [
29]. Additionally, other objective features include preventing the shedding of transient under-frequency loads [
35] and improving reliability [
36]. In addition, there is wind uncertainty management [
37] and fault rides through grid-connected assistance. In addition, offshore wind farms based on VSC HVDC [
32], phase balancing [
38], reduction of wind curtailment and congestion management [
39] are objective functions. Minimization of active energy loss payment [
40] is another objective function for optimizing ESSs. Additionally, in a power distribution system [
41], ESSs could be optimized with other distributed generators.
Other microgrid-related optimization problems associated with ESSs include optimal planning. The authors in [
42] are proposing a fresh ideal planning model to minimize the operating costs of an isolated microgrid that is not attached to a bigger grid using casual programming. Setting the confidence levels of the probability limitations of the spinning reserve results in microgrid operation through a trade-off between reliability and economy. The authors in [
43] also suggest a fresh bi-level ideal planning model to promote the involvement of ESSs in the regulation of the isolated financial activity of microgrids. In this model, the upper-level sub-problem could be formulated to minimize the net cost of isolated microgrid, while the lower-level aims at maximizing ESS profits in real-time pricing environments that are determined in the upper-level decision by demand responses. In addition, a two-stage optimization technique is suggested in [
44] for optimal distributed generation unit planning considering the inclusion of an ESS. The first phase uses the well-known loss sensitivity factor strategy to determine the places of the installation and the original capability of the distributed generation. In addition, the second phase defines the distributed generation’s ideal assembly capabilities for maximizing investment advantages and system voltage stability and minimizing line losses.
Due to the inclusion of renewable energy sources, ESSs are becoming increasingly important and have many applications [
45]. Some generation must be accessible to keep system stability in order to use wind turbines to produce electricity. In this case, ESS can be used to avoid installation of fresh generation crops [
46,
47]. ESS can also store unusable electrical energy from wind turbines and photovoltaic cells. When a sudden shift happens, this energy can be used later. For example, during a sudden passage of dark clouds, ESS can support PV crops to restore voltage dip, resulting in a smooth output of [
48,
49]. Other ESS applications include improving power quality [
50,
51], emergency operating reserves [
52,
53], decreasing the likelihood of power blackouts [
54], supply and demand matching [
55], load shifting [
56], transmission and distribution deferral upgrade [
57], grid black start [
58], energy arbitration [
59], voltage support [
60], frequency balancing [
61,
62] and conventional generation reduction during peak hours [
63]. In addition, as shown in this paper, one of the most significant applications is to reduce operation and maintenance costs. ESSs have no rotating components, resulting in lower operating and maintenance costs and easier troubleshooting [
64,
65].
Various kinds of ESSs were intended and created. Some of these are already commercially accessible. The remainder of them still need to be enhanced in studies. There are distinct charging and discharge features of distinct ESS techniques. The charging and discharge rates among these distinct techniques are also distinct.
Figure 5 shows various ESS technologies’ power and discharge rate. To compare the various ESS systems, several criteria are used. The authors in [
66] contrasted various features and the benefits and disadvantages of ESS techniques. Reliability is a crucial factor in evaluating a certain power system. It is essential for both parties to evaluate the reliability of a power system; providers and clients. Reliability of a power system implies that the system should be accessible at an financial and sensible cost to supply electrical energy when it is required. In order to improve and boost the reliability of power systems, many techniques and devices have been created. In addition to the other benefits that an optimally sized ESS provides for a microgrid, ESSs enhance the reliability of the microgrid when integrated with it [
67]. ESSs in many respects improve accessibility. One of them is that they are supporting demand shaving, particularly at peak times. In addition, it does not cost in terms of manufacturing or operation when an ESS is formed. There are other indexes of reliability and they also improve after the ESS has been integrated [
3].
The uncertainty is important when renewable energy sources are integrated into a power system because the power output from these sources cannot be correctly determined. This also relies primarily on forecasts that are not entirely accurate. Furthermore, reliability is now becoming more important and many techniques are being created to improve reliability. The missing gap in the literature is that under wind uncertainties there is no technique for optimally sizing an ESS for a microgrid. The uncertainties must be taken into consideration in order to find the optimum size of an ESS for a microgrid linked to renewable energy sources. In this case, the problem is called a probabilistic problem of optimization that is distinct from deterministic problems of optimization. Two techniques used to optimize such problems are stochastic optimization and robust optimization. Stochastic programs are complicated and more hard to formulate [
69]. There are many approaches to solving stochastic problems of optimization. Some of these approaches are breakdown, statistically based techniques, stochastic breakdown, multi-stage problem techniques and computational illustration [
69]. The generic sizing methodology using pinch analysis and design room is another technique for optimally sizing an ESS linked to a system with renewable energy sources [
70]. Benders decomposition is one of the decomposition methods used to solve very big stochastic optimization problems [
71]. Benders decomposition is a method used with scenarios to solve stochastic programming problems.
4. A Case Study
A microgrid linked to a main grid is regarded to conduct a case study in order to optimally size an ESS under wind uncertainties and to calculate the reliability indices. The case study will be provided with its information in this chapter. The findings will be presented and discussed in
Section 5. The system to be studied is made up of three heat generators distributed in the microgrid. The problem of unit commitment is solved using stochastic programming for a two-year planning horizon. For the first year, the load information was drawn from the IEEE Reliability Test System (RTS-96) [
79]. The same load profile was repeated with a rise of %5 for the second year. In this case research, reserve and emission limitations are not regarded. Weibull distribution uses Dhahran city’s Weibull distribution parameters to create wind speed scenarios. From historical information, these parameters were calculated. Since there is uncertainty and wind speed cannot be predicted accurately, the uncertainty and randomness should be dealt with in many scenarios. In this paper, fresh scenarios were produced using the parameters instead of taking scenarios from historical information. One of the techniques used to manage randomness in stochastic optimization is to consider distinct situations. Ten wind speed scenarios were developed randomly using the Weibull distribution parameters calculated for 19 years in Dhahran for monthly wind distribution [
80].
Table 1 shows these parameters. In this table,
K is the parameter of the form and
c is the parameter of the scale. The Weibull distribution’s probability density function used to calculate each hour’s wind speed is formulated in Equation (
46). It is presumed that these ten scenarios are real information collected from ten distinct years. It is presumed that the real information from ten years is taken. The annual number values of
k and
c are respectively
and
.
Figure 8 indicates the Weibull distribution for annual wind speeds and the Dhahran wind frequency histogram [
80] and
Table 2 shows the average annual wind speeds for all situations in Dhahran. All scenario probabilities are equivalent, meaning that for all cases,
is equivalent to
. The ten scenarios were repeated for a second year to cover the two-year horizon.
The features of the three generation units are shown in
Table 3. Except for the minimum uptime and minimum downtime, the generation unit features are from [
73]. The reliability indices are calculated before the optimally sized ESS is integrated and the impact of integrating an optimally sized ESS on the reliability of the microgrid is investigated after its integration. In these calculations, the component
and
are required and displayed in
Table 4.
Table 5 reflects the values used in this model for the other parameters.
Figure 9 demonstrates the load curve over the two years as well as the load duration curve.
Figure 10 demonstrates the first year’s ten wind velocity scenarios. They are depicted at daily average speeds. Repeat the same situations again to cover the second year.
Figure 11 shows the hourly velocity of the first twenty-four hours for the ten situations.
The microgrid unit commitment problem is solved for a two-year horizon before and after the integration of the ESS to calculate the output power of each generation unit, the power exchanged with the main grid, and the power taken or produced in the second case by the ESS. The total cost of investment and generation will also be explored in relation to the reliability indicators. This system’s optimization problem was modeled in the language of GAMS (General Algebraic Modeling System) [
81] and was solved in the NEOS server [
82], a free online service to solve numerical optimization problems.
5. Results and Discussions
The problem of unit commitment was solved using the stochastic programming method to find the optimal size of the ESS that minimizes total cost. The ESS has been discovered to have a rated power of 16.59 MW and the rated power is 128.84 MWh. The ESS’ investment cost is approximately
$58,554.
Figure 12 demonstrates the unit commitment problem solution for the first twenty-four hours before combining the microgrid with the ESS and
Figure 13 demonstrates the unit commitment problem solution after calculating the ideal size of the ESS and integrating it with the microgrid. These two numbers only depict the power with favorable values, meaning that they do not represent the power when charging the ESS and also when selling power to the main grid. The two variables associated with the energy generated by the ESS and the power exchanged with the main grid are shown with their adverse values in
Figure 14. The ESS functions as a load when charging and when it discharges acts as a generator. The same concept is applied to the main grid where, when energy is imported into the microgrid, it is considered as a load when energy is exported to the microgrid. The ESS and central grid are the only elements that, due to the bidirectionality of the energy in these parts, have authority with negatives. It must have stored energy in order for the ESS to generate power.
Figure 15 indicates the amount of energy collected during the first twenty-four hours.
The most expensive generation unit, which is Unit 1, is working at a low level when the ESS in not integrated as shown in
Figure 12 and it is not working for most hours when the ESS is integrated as shown in
Figure 13 in order to reduce the operation cost. The ESS has made the microgrid more reliable economically and saved a portion of the production cost when it worked instead of Unit 1.
Figure 12 and
Figure 13 show the solutions of the unit commitment problem in both cases as mentioned previously. By solving the unit commitment problem, it is required to match energy demand at the minimum cost. As shown in
Figure 13, it is noticeable that the most expensive unit is OFF for most of the time and the demand is supplied at a lower cost because of the optimally sized ESS. The cost function of a unit is assumed to be linear in this case study. This leads to differentiate and sort the units by cost easily. The cheapest unit runs first and then the second cheapest and so on till matching the demand.
To prove that the stochastic programming method solution is reasonably optimal, using the mixed-integer linear programming method, the ten scenarios, previously assumed to be actual data for ten different years, have been solved separately. The outcomes are shown in
Table 6 and are contrasted in
Table 7 with the solution of the stochastic programming technique. The probabilistic optimization process solution is the second-best solution after Scenario 6 solution. So, this demonstrates that the probabilistic method provides a sensible alternative in comparison with the ten scenarios’ determinist method. A reasonable solution here means a better solution which leads to the minimum cost. These model and technique will help a microgrid developer to make a better economic decision on ESS sizing. The stochastic programming technique is used when there is more than one scenario and better outcomes are obtained as shown in Tabels
Table 6 and
Table 7. While in stochastic programming solution the investment cost of the storage system is greater than in other situations, the total cost is still smaller. The goal is to minimize the total cost, not the cost of investment. Scenario 6’s solution is smaller than the stochastic programming solution, but instead of all situations it represents only one scenario. The results of deterministic and probabilistic optimization problems are illustrated also in
Figure 16,
Figure 17 and
Figure 18 to be read and compared easily.
In both cases, reliability indices were calculated to illustrate how reliability indices improve after the microgrid integration of the optimally sized ESS. In both cases, the reliability indices are shown in
Table 8. It also demonstrates the energy cost of manufacturing in both instances. Following integration of the ESS, the cost of manufacturing reduces as shown in this table. In addition, the microgrid’s accessibility is improving. The load point-related reliability indices are enhancing noticeable distinctions. It is also discovered that SAIFI and SAIDI are within the suggested boundaries.
One of the goals of incorporating the optimally sized ESS with the microgrid is to improve the reliability of the microgrid and this goal has been accomplished. After integration of the ESS, the microgrid integrated with the ESS works with greater accessibility and reduced cost. In addition, as shown in
Figure 12, although the system sells more electricity to the main grid to reduce net costs and compensate for high production costs, and as shown in
Figure 13, although the system purchases more electricity from the main grid, the net cost in Case 1 is still greater than Case 2. In the second case, the net cost also includes the ESS investment cost. Naturally, in both cases the net cost is the minimum possible cost to supply electrical energy to the demand. While this comparison is only for the first twenty-four hours, the whole horizon can be generalized. This clarifies the important economic advantages of microgrid integration of the ESS. To find the optimal size of an ESS to be integrated with any microgrid, other optimization techniques could be used. In addition, other methods could be used to enhance a microgrid’s reliability in particular.
Moreover, using the other approach illustrated in Algorithm 2, the optimal size of an ESS has been calculated as well. As mentioned previously, this method might give more economic results. The investment cost in this method is less than the investment cost calculated in the first approach. The rated power of the optimally sized ESS in this technique is 15.87 MW and the rated energy is 111.24 MWh. The investment cost of this ESS is about $52,416. This cost is less than the investment cost in the first approach by 10.48%.