MILP-PSO Combined Optimization Algorithm for an Islanded Microgrid Scheduling with Detailed Battery ESS Efficiency Model and Policy Considerations

This paper presents the optimal scheduling of a diesel generator and an energy storage system (ESS) while using a detailed battery ESS energy efficiency model. Optimal scheduling has been hampered to date by the nonlinearity and complexity of the battery ESS. This is due to the battery ESS efficiency being a multiplication of inverter and battery efficiency and the dependency of an inverter and any associated battery efficiencies on load and charging and discharging. We propose a combined mixed-integer linear programming and particle swarm optimization (MILP-PSO) algorithm as a novel means of addressing these considerations. In the algorithm, MILP is used to find some initial points of PSO, so that it can find better solution. Moreover, some additional algorithms are added into PSO to modify and, hence, improve its ability of dealing with constraint conditions and the local minimum problem. The simulation results show that the proposed algorithm performs better than MILP and PSO alone for the practical microgrid. The results also indicated that simplification or neglect of ESS efficiency when applying MILP to scheduling may cause a constraint violation.


Introduction
In 2015, the Hawaii legislature adopted Act 97 featuring a renewable portfolio standard of 100 percent by 2045, making Hawaii the first U.S. state to make a legally binding commitment to produce all of its electricity from indigenous renewable sources. Act 97 also established interim targets of 30, 40, and 70 percent by 2020, 2030, and 2040, respectively [1]. The Hawaii legislature subsequently adopted Act 200 into law, concluding that microgrids can provide valuable services to the public utility electric grid, including many ancillary services, such as frequency and voltage control, and thereby can increase public safety and security [2]. Section 4 of Act 200 notes potential opportunities for microgrid demonstration projects at the Natural Energy Laboratory of Hawaii Authority (NELHA) that test advanced technologies and market concepts that can facilitate microgrid development consistent with the purpose of Act 200. Accordingly, NELHA is planning a microgrid that consists of photovoltaic (PV) generation, ESS, and an energy management system (EMS) to enhance energy resiliency, self-sufficiency and reliability through the capability of operating in an islanded mode during outages of the Hawaii Island electrical grid.
NELHA's configuration is consistent with remote and islanded renewable energy source (RES)-connected microgrids and distribution networks that use diesel generators, ESSs, and RESs, such

System Configuration
The algorithm has been developed to manage critical loads at the Hawaii Ocean, Technology and Technology (HOST) Park, which is managed by NELHA on Hawaii island. From Ho'ona Bay to Wawaloli Beach of the ocean-facing portion of the HOST Park, NELHA consists of three main electricity loads-a research campus, a farm compound, and a 55-inch pump station. While all three loads would benefit from inclusion in a microgrid, the three loads are separated by multiple meters and along a distribution feeder line that is operated by Hawaiian Electric Light Company, the Hawaii island utility. The 55-inch pump station location has been selected for development of the initial microgrid because Energies 2020, 13,1898 3 of 17 of uncertain tariff and interconnection implications of an advanced hybrid microgrid. Figure 1 is a line diagram of the microgrid that consists of the 750 kW diesel generator, the 600 kW PV generation system, the 500 kW/567 kWh ESS, and the pump station with an average load of 297 kW. The PV generation system, ESS, and microgrid are currently under development and they are expected to be operational in 2021.
Energies 2020, 13,1898 3 of 17 electricity loads-a research campus, a farm compound, and a 55-inch pump station. While all three loads would benefit from inclusion in a microgrid, the three loads are separated by multiple meters and along a distribution feeder line that is operated by Hawaiian Electric Light Company, the Hawaii island utility. The 55-inch pump station location has been selected for development of the initial microgrid because of uncertain tariff and interconnection implications of an advanced hybrid microgrid. Figure 1 is a line diagram of the microgrid that consists of the 750 kW diesel generator, the 600 kW PV generation system, the 500 kW/567 kWh ESS, and the pump station with an average load of 297 kW. The PV generation system, ESS, and microgrid are currently under development and they are expected to be operational in 2021.

Formulation for MILP
The proposed algorithm utilizes MILP for finding partial initial search points of the PSO model. Both of the models are separately formulated in this paper since the MILP is suitable for a linear model and the PSO is suitable for a non-linear model.
The purpose of the developed algorithm is to extend the island mode operation time by more efficiently fueling the diesel generator. This can be achieved by optimizing the efficiency of the energy generation and ESS system. In an islanded microgrid with a diesel generator, minimizing the fuel consumption of the diesel generator is the energy efficient way to operate. Hence, the objective function is expressed as: where the subscript t is the index for operation time intervals, PD is the diesel generator output, CD is the generation cost per hour of the diesel generator, ΩT is the set of time periods, and Δt is the duration of each time interval. The diesel generator cost at time t, CD,t, is expressed as: where UD is the diesel generator on/off status and a, b, and c are the cost coefficients and derived by using the curve fitting tool in MATLAB based on the diesel generator fuel consumption data [16].

Formulation for MILP
The proposed algorithm utilizes MILP for finding partial initial search points of the PSO model. Both of the models are separately formulated in this paper since the MILP is suitable for a linear model and the PSO is suitable for a non-linear model.
The purpose of the developed algorithm is to extend the island mode operation time by more efficiently fueling the diesel generator. This can be achieved by optimizing the efficiency of the energy generation and ESS system. In an islanded microgrid with a diesel generator, minimizing the fuel consumption of the diesel generator is the energy efficient way to operate. Hence, the objective function is expressed as: min where the subscript t is the index for operation time intervals, P D is the diesel generator output, C D is the generation cost per hour of the diesel generator, Ω T is the set of time periods, and ∆t is the duration of each time interval. The diesel generator cost at time t, C D,t , is expressed as: where U D is the diesel generator on/off status and a, b, and c are the cost coefficients and derived by using the curve fitting tool in MATLAB based on the diesel generator fuel consumption data [16]. The value of a, b, and c are 32,000, 210, and 0.097, respectively, where the unit of C D is Korean Won (KRW) per hour. The quadratic diesel generator cost curve is split into 10 linear pieces and, hence, to form piecewise linear cost function since the cost has to be transformed into the linear function. Consequently, the objective function for the MILP is expressed as: where S is the slope of every linearly split part derived from Equation (2), the subscript l is the index for the slope, and Ω L is the set of slopes. Table 1 shows the value of each slope. The constraint conditions to be satisfied ∀t ∈ Ω T and ∀l ∈ Ω L are l∈Ω L P D,l,t + P ESS,t + P PV,t = P L,t , − P ESS,max ≤ P ESSchg,t ≤ 0, where P ESSdis and P ESSchg are the discharge and charge output power of ESS, respectively, P PV is the output power of PV, P L is the power of load demand, P D,l,min and P D,l,max are the minimum and maximum power of diesel generator at lth interval, respectively, P ESS,max the maximum power of ESS, SOC min and SOC max are the minimum and maximum value of SOC, respectively, and P ESS is the output power of ESS. P D,l,min and P D,l,max ∀l ∈ Ω L are 0 and 75 kW, respectively, since the range of P D is split into 10 linear pieces. The SOC of ESS at time t is expressed as: where η ESSdis and η ESSchg are the efficiencies of ESS when discharging and charging, respectively. For the MILP formulation, they are considered to be constants.

Formulation for PSO
The formulation has to be different from that of the MILP, since the PSO is adopted to consider the detailed model of the system. For the PSO, instead of Equation (3), the objective function is expressed, as: min Energies 2020, 13, 1898

of 17
Note that U D,t is multiplied to the whole diesel fuel cost, C D,t , instead of being multiplied only to the coefficient a because of the characteristic of the PSO. P D,t could be selected as non-zero value, even if U D,t is zero, which is physically impossible, since the PSO is heuristically searching method. Accordingly, to prevent this error, U D,t is multiplied to the whole diesel fuel cost, so that the diesel generation cost becomes definitely zero if the diesel generator is turned off (U D,t = 0). The constraint conditions Equations (6)- (11), (13) are unnecessary for the PSO, since P D,t and P ESS,t are now considered as a single variable each. Hence, the following constraints are needed: where P D,min and P D,max are zero and the rated power of diesel generator, respectively. Most importantly, the SOC formulation considering the ESS efficiency has to be changed. In previous works [3][4][5][6][7][8][9][10][11][12][13][14][15], the ESS efficiency has been neglected or simplified, whereas it is considered in detail in this paper, which is the key contribution of this paper. The net ESS efficiency is the multiplication of the inverter efficiency η inv and the battery efficiency η BT and it is expressed as: where η BTchg and η BTdis are the charge and discharge efficiency of the battery, respectively. Note that, in order to consider the net ESS efficiency in detail, both inverter and battery efficiencies have to be considered as a function of output power. The generic inverter efficiency is referred to [17] and it can be divided into several linear equations, as (in per unit): where P ESS = P ESSdis when discharging and P ESS = P ESSchg when charging. The energy efficiency for rechargeable battery is expressed as [18] (in per unit): where P BTchg and P BTdis are the charge/discharge power flow of the battery from the inverter and they are expressed as: Refer to Equation (20), let η inv be expressed as a general form of linear function with coefficient C 1 and C 0 , that is: Energies 2020, 13, 1898 6 of 17 Subsequently, by substituting Equations (21)- (25) into Equations (18) and (19), the net ESS efficiency is represented as (in per unit): Note the per unit value of CAP is 1 and hence is omitted in Equations (26) and (27). By substituting Equations (14), (26), and (27) into (12), all of the constraint conditions can be represented in terms of controllable variables (P ESS , P D , and U D ) and parameters.

Generation Scheduling Algorithm
As shown in Equations (14), (26), and (27), in the detailed ESS efficiency model, the SOC constraint is represented as a highly nonlinear and complex function of P ESS . Hence, numerical optimization techniques, such as LP or quadratic programming, are not applicable to the problem. It is inevitable to use heuristic optimization techniques to take account of the detailed model of the ESS efficiency and PSO is used in this paper. However, the heuristic optimization techniques also have some disadvantages of performance dependency on initial points and imperfection of reflecting constraint conditions into the algorithm. We propose a MILP-PSO coordinated algorithm for an optimal scheduling of a diesel generator-ESS islanded microgrid to solve these problems.

PSO Algorithm
The PSO algorithm is working based on the following equations [17]: where V is the velocity vector, w is the weight factor, c 1 and c 2 are the acceleration constants, rand 1 and rand 2 are random numbers in the range between 0 and 1, X is the position vector, X lb and X gb are the local and the global best positions for X, respectively, w max and w min are the maximum and the minimum values of w, respectively, i is the particle index, k is the iteration index, and N is the total number of iterations. In this paper, the position vector includes P ESS , P D , and U D at every time slot. Refer to [19][20][21], the maximum value of the sum of c 1 and c 2 should be 4 and an effective initial value for each is 2. Based on these initial values, we have chosen c 1 , c 2 , w max and w min as 1, 1, 1, and 0.1, respectively, as grounds for trial-and-error simulation results. It is noticeable that there are some competitive offline and online parameter control methods that alleviate the user of this time-consuming phase while providing superior results [22][23][24][25]. An application of parameter control methods remains as a future work, as this paper is focused on the detailed model of battery ESS and the application of MILP for finding a part of PSO initial searching points.
Although PSO has been developed primarily as unconstrained optimization methods [26], it is considered to be a good alternative for solving constrained optimization problems. The most common approach for solving a constrained optimization problem is the use of a penalty function [27]. The problem with this approach is that no other method exists other than trial-and-error for defining pertinent penalty functions [28]. If the penalty values are high or low, the solutions could be trapped in a local minimum or could not be well detected. Furthermore, the solution of the optimal ESS scheduling usually lies on the limit of the SOC constraint, since the ESS will continuously charge and Energies 2020, 13, 1898 7 of 17 discharge power until its SOC reaches the maximum or the minimum value. The tendency of the solution to lie on the constraint limit makes finding solutions much more difficult. We add a simple algorithm that forces the variables to stay within the feasible solutions into the PSO to alleviate the penalty function problem. Figure 2 shows the algorithm flow chart.
Although PSO has been developed primarily as unconstrained optimization methods [26], it is considered to be a good alternative for solving constrained optimization problems. The most common approach for solving a constrained optimization problem is the use of a penalty function [27]. The problem with this approach is that no other method exists other than trial-and-error for defining pertinent penalty functions [28]. If the penalty values are high or low, the solutions could be trapped in a local minimum or could not be well detected. Furthermore, the solution of the optimal ESS scheduling usually lies on the limit of the SOC constraint, since the ESS will continuously charge and discharge power until its SOC reaches the maximum or the minimum value. The tendency of the solution to lie on the constraint limit makes finding solutions much more difficult. We add a simple algorithm that forces the variables to stay within the feasible solutions into the PSO to alleviate the penalty function problem. Figure 2 shows the algorithm flow chart. A 'Penalty Function Relaxation (PFR)' component is added to the general PSO algorithm, as shown in Figure 2. The purpose of the PFR algorithm is simply to relax the burden of the penalty function by forcing the variables to stay within the feasible solution range. All of the constraints, except that of the SOC, are handled by the proposed part of the algorithm. This is because the SOC is a highly nonlinear function of PESSchg and PESSdis in consideration of the detailed model of battery ESS, as shown in Equations (14), (26), and (27). Consequently, maintaining the SOC within a feasible range while updating the position vector can no longer be achieved by simple rules. A more complex algorithm, which understands the nonlinear relationship between PESS and SOC, is required to update the SOC in such a manner to keep it within a feasible range. In this case, we only used the penalty function for the SOC constraint due to its simplicity. The sequence of the PFR algorithm is as follows: A 'Penalty Function Relaxation (PFR)' component is added to the general PSO algorithm, as shown in Figure 2. The purpose of the PFR algorithm is simply to relax the burden of the penalty function by forcing the variables to stay within the feasible solution range. All of the constraints, except that of the SOC, are handled by the proposed part of the algorithm. This is because the SOC is a highly nonlinear function of P ESSchg and P ESSdis in consideration of the detailed model of battery ESS, as shown in Equations (14), (26), and (27). Consequently, maintaining the SOC within a feasible range while updating the position vector can no longer be achieved by simple rules. A more complex algorithm, which understands the nonlinear relationship between P ESS and SOC, is required to update the SOC in such a manner to keep it within a feasible range. In this case, we only used the penalty function for the SOC constraint due to its simplicity. The sequence of the PFR algorithm is as follows: (1) After updating V and X, P D is forced to be set as the net load (P L − P PV − P ESS ) in order to balance the generation and load. (2) Afterwards, all of the variables are checked as to whether if they violate the upper or lower limit. If so, they are constrained to their closest limit value. However, by adjusting the violated variables, the generation and load equality constraint could be violated. (3) Hence, this time, P ESS is forced to be set as the net load (P L − P PV − P D ) in order to balance the generation and load again. For sequence in Equation (2), other rules may be applied. For instance, instead of binding the violated variable on the limit, it can be readjusted to be within the limit. In such a case, the following equation can be applied to the violated variables: where X i,viol denotes the amount of violation by the variable X i . Comparative analysis of both methodologies yielded results showing little variation between the two, but suggested that the methodology of sequence (2) performed slightly better than that of Equation (31). Nonetheless, we were unable to render a definitive assessment of superiority between the two methodologies, because the PSO algorithm contains a random variable that might yield a slightly different result in each simulation. In many cases of the optimal scheduling problem, including this paper, some variables tend to be bound on their upper or lower limit. For instance, the SOC could operate at its minimum and/or maximum value for at least one cycle (the simulation results show that it has minimum value at a certain time slot) and/or the output of ESS could operate at its minimum and/or maximum value. Therefore, we have adopted the methodology that is presented in sequence (2) in this paper.
Note that, due to the sequence in Equation (4), the proposed algorithm can avoid being formulated as the mixed-integer PSO (MIPSO) problem, which makes the formulation more complicated, since it contains both discrete and continuous variables. In other words, U D is not contained in the position vector X and is simply acquired by the sequence in Equation (4). This is possible due to the characteristic of the diesel generator cost function in Equation (2), which is included in the objective function of the PSO. Due to the existence of the cost coefficient a, once being operated, the diesel generator tends to generate its power as much as possible in order to achieve cost efficient operation.
The PFR algorithm cannot deal with the SOC constraint condition in Equation (12), since it is very complex in terms of the controllable variables. Hence, it is unavoidable to use the penalty function to take account of the SOC constraint. The penalty function f p is presented as: where k p is the penalty function coefficient and SOC viol,t is the amount of SOC violation at t in per unit. The penalty function is formulated by trial-and-error, as referred to [28], and k p is set to 100. By applying PFR algorithm, all of the constraints, except the SOC constraint, can be excluded from the penalty function.

PSO Coordination with MILP
We propose a methodology to find proper initial points to alleviate such difficulties in finding a solution since the penalty function makes finding optimal solution difficult. To find initial points of PSO, MILP is adopted, since it is the most common optimization technique for the optimal scheduling. To adopt MILP, the problem is linearized as in Equations (3)- (14). The SOC constraint in Equation (12) is linearized by setting η ESS to a constant number, as the previous works [3][4][5][6][7][8][9] have done. However, in this paper, we have applied 11 different values to η ESS ranging from 90% to 100% with 1% interval. Hence, 11 different particles are acquired from MILP as the initial points of the PSO. The rest of the initial points are working the same as with the regular PSO. Hence, the proposed algorithm can take advantages from both MILP (by fixing some initial points near the local optimal value) and PSO (by retaining the chance of searching an entire feasible area). Figure 3 shows the flow chart of getting the initial points of PSO by using MILP. The set of solutions resulting from MILP is used as a portion of the initial points of the PSO, as illustrated in Figure 3. The rest of the initial points of the PSO are randomly generated from the uniformly distributed values within the allowable range. For instance, if the population of PSO N P is 1000, 11 are acquired from the algorithm shown in Figure 3 and the rest of the population is randomly selected. proposed algorithm can take advantages from both MILP (by fixing some initial points near the local optimal value) and PSO (by retaining the chance of searching an entire feasible area). Figure 3 shows the flow chart of getting the initial points of PSO by using MILP. The set of solutions resulting from MILP is used as a portion of the initial points of the PSO, as illustrated in Figure 3. The rest of the initial points of the PSO are randomly generated from the uniformly distributed values within the allowable range. For instance, if the population of PSO NP is 1000, 11 are acquired from the algorithm shown in Figure 3 and the rest of the population is randomly selected.

Simulation Environment
We used the real measured data of NELHA's 17.5-kW PV system and the pump station load shown in Figure 4 to test the algorithm. Since the 600-kW PV system of the target microgrid shown in Figure 1 has not been installed yet, we used the 17.5-kW PV data and scaled it up to 600 kW. Four cases were tested to present two different weather conditions-a sunny day (Cases 1 and 2) and a cloudy day (Cases 3 and 4)-and two different SOC initial values-40% (Cases 1 and 3) and 60% (Cases 2 and 4). For all cases, an island mode starts at 15 h. Figure 5 shows the PV generation and the pump station load data for Cases 1-4.
Go to PSO initialization in Fig. 2 and set X 1 , …, X 11 as part of initial X YES NO Figure 3. Flow chart of acquiring the initial points of PSO by using mixed-integer linear programming (MILP).

Simulation Environment
We used the real measured data of NELHA's 17.5-kW PV system and the pump station load shown in Figure 4 to test the algorithm. Since the 600-kW PV system of the target microgrid shown in Figure 1 has not been installed yet, we used the 17.5-kW PV data and scaled it up to 600 kW. Four cases were tested to present two different weather conditions-a sunny day (Cases 1 and 2) and a cloudy day (Cases 3 and 4)-and two different SOC initial values-40% (Cases 1 and 3) and 60% (Cases 2 and 4). For all cases, an island mode starts at 15 h. Figure 5 shows the PV generation and the pump station load data for Cases 1-4. shown in Figure 4 to test the algorithm. Since the 600-kW PV system of the target microgrid shown in Figure 1 has not been installed yet, we used the 17.5-kW PV data and scaled it up to 600 kW. Four cases were tested to present two different weather conditions-a sunny day (Cases 1 and 2) and a cloudy day (Cases 3 and 4)-and two different SOC initial values-40% (Cases 1 and 3) and 60% (Cases 2 and 4). For all cases, an island mode starts at 15 h. Figure 5 shows the PV generation and the pump station load data for Cases 1-4.  Three different optimal scheduling methods are tested to prove the effectiveness of the proposed algorithm. The following a are brief explanation about the tested algorithms:  MILP: MILP is adopted to solve the scheduling problem. The problem is linearized in a piecewise fashion to adopt MILP. Eleven results are acquired by changing ηESS from 90% to 100% with 1% interval.  PSO: A general PSO algorithm is applied. All of the initial points are randomly selected. The rest of the algorithm is the same as explained in Section III-A, except that it has no Equations (1) and (3) sequences in PRF algorithm and, hence, has a different penalty function that takes account of the generation and load balance constraint. The penalty function is expressed, as: where kp is set to 100,000 grounds for trial-and-error. The exponential form used in Equation (32) is not applicable here, since we experienced that the solution cannot be found by applying exponential form with the generation and load balance constraint.  Three different optimal scheduling methods are tested to prove the effectiveness of the proposed algorithm. The following a are brief explanation about the tested algorithms: • MILP: MILP is adopted to solve the scheduling problem. The problem is linearized in a piecewise fashion to adopt MILP. Eleven results are acquired by changing η ESS from 90% to 100% with 1% interval. • PSO: A general PSO algorithm is applied. All of the initial points are randomly selected. The rest of the algorithm is the same as explained in Section III-A, except that it has no Equations (1) and (3) sequences in PRF algorithm and, hence, has a different penalty function that takes account of the generation and load balance constraint. The penalty function is expressed, as: where k p is set to 100,000 grounds for trial-and-error. The exponential form used in Equation (32) is not applicable here, since we experienced that the solution cannot be found by applying exponential form with the generation and load balance constraint. Since MILP is applied to the linear model while the others are applied to the detailed model (a practical model that considers the detailed model of the net ESS efficiency), it is not appropriate to directly compare those results. To make a fair comparison between algorithms, the same detailed model evaluates all of the solutions acquired from the algorithms. Figure 6 shows the methodology of solution evaluation among three algorithms. Since MILP is applied to the linear model while the others are applied to the detailed model (a practical model that considers the detailed model of the net ESS efficiency), it is not appropriate to directly compare those results. To make a fair comparison between algorithms, the same detailed model evaluates all of the solutions acquired from the algorithms. Figure 6 shows the methodology of solution evaluation among three algorithms.  Table 2 shows the simulation results of the operation cost and the sum of SOC violation at each time slot for all cases by applying different methods shown in Figure 6. Figure 7 shows the simulation results of the ESS power and SOC for each time slot using the proposed MILP-PSO algorithm. Careful observation reveals initial values of the SOC in Figure 7(a-d) are not exactly at 40% or 60%. This is because these are not actually initial values, but are the values after the first time slot. The SOCs at the first time slot of Cases 1 and 2 are slightly higher than 40% and 60%, respectively, since the ESS charges in the first time slot of Cases 1 and 2, as shown in Figure 7a,b. Similarly, the SOCs at the first time slot of Cases 3 and 4 are slightly lower than 40% and 60%, respectively, since the ESS discharges in the first time slot of Cases 3 and 4, as shown in Figure 7c,d.  Table 2 shows the simulation results of the operation cost and the sum of SOC violation at each time slot for all cases by applying different methods shown in Figure 6. Figure 7 shows the simulation results of the ESS power and SOC for each time slot using the proposed MILP-PSO algorithm. Careful observation reveals initial values of the SOC in Figure 7(a-d) are not exactly at 40% or 60%. This is because these are not actually initial values, but are the values after the first time slot. The SOCs at the first time slot of Cases 1 and 2 are slightly higher than 40% and 60%, respectively, since the ESS charges in the first time slot of Cases 1 and 2, as shown in Figure 7a,b. Similarly, the SOCs at the first time slot of Cases 3 and 4 are slightly lower than 40% and 60%, respectively, since the ESS discharges in the first time slot of Cases 3 and 4, as shown in Figure 7c,d. Applying MILP to the ESS scheduling problem causes the SOC violation problem if the practical plant (ESS) is highly nonlinear, as shown in Table 2. When considering the ESS efficiency to be 95% or 100% as most previous works have done definitely contributes to the SOC violation. In the case of 100% ESS efficiency, Table 2 shows that the sum of SOC violations for 9 h with 15-min. time intervals ranges from 85.0% to 142.9%, depending on the case studies. In the case that applies the general PSO, the SOC violation is even worse and the cost is also high. This is because the general PSO is hard to handle with the constraint conditions and it is highly dependent on the initial condition.

Simulation Results and Discussion
Decreasing the ESS efficiency can avoid the risk of violating SOC, but it increases the operational cost. Moreover, it is impossible to choose a proper constant ESS efficiency value since it depends on the operational condition, such as the initial SOC, load, and PV generation. It is shown as the bold letters of Table 2-for Cases 1 and 2, the proper constant ESS efficiency is 93%, whereas it is 94% for Cases 3 and 4. Yet, these results do not represent the best choices for Cases 1 and 2. By using MILP-PSO, the cost can be even further decreased without the SOC violation, i.e., the cost is decreased by 0.53% and 0.60% for Case 1 and 2, respectively, when compared to the best solution of the conventional MILP.
The simulation results vary every time they are conducted since the PSO and MILP-PSO contains random parameters in their algorithms. Accordingly, the results of PSO and MILP-PSO in Table 2 are the average values of a thousand different simulation results. The variation of MILP-PSO results is very small since we have upgraded it, as shown in Figures 2 and 3. Table 3 shows the minimum, maximum, and standard deviations of the costs for Cases 1 and 2. Even the maximum costs among 1000 different MILP-PSO simulation for Cases 1 and 2 are smaller than those of the best solutions of the MILP, as shown in Table 3.  Decreasing the ESS efficiency can avoid the risk of violating SOC, but it increases the operational cost. Moreover, it is impossible to choose a proper constant ESS efficiency value since it depends on the operational condition, such as the initial SOC, load, and PV generation. It is shown as the bold letters of Table 2-for Cases 1 and 2, the proper constant ESS efficiency is 93%, whereas it The population number N p and the total iteration number N of the PSO algorithm is adjustable. Additional simulations have been conducted for Case 1 to analyze the effect of changing those numbers on the results and the results are shown in Figure 8. Figure 8a shows the result costs and the computation Energies 2020, 13, 1898 14 of 17 times by changing N p to 100, 300, 500, and 1000, while N is fixed as 1000. As N p increases, the cost is reduced, but the reduction rate is very small while the computation time increases drastically. Similarly, by increasing N to 500, 1000, 1500, and 2000 while fixing N p as 1000, the computation time is drastically increased, as shown in Figure 8b. In this case, the cost is slightly increased even if N is increased from 1500 to 2000. This is due to the PSO containing random variables that can yield slightly different results each time. Consequently, the increment profile of the population number and the iteration number causes too large a computation time increment relative to the small size of the cost reduction.
Energies 2020, 13,1898 14 of 17 increases drastically. Similarly, by increasing N to 500, 1000, 1500, and 2000 while fixing Np as 1000, the computation time is drastically increased, as shown in Figure 8b. In this case, the cost is slightly increased even if N is increased from 1500 to 2000. This is due to the PSO containing random variables that can yield slightly different results each time. Consequently, the increment profile of the population number and the iteration number causes too large a computation time increment relative to the small size of the cost reduction.
(a) (b) Since this algorithm is about to be applied to the real test-site where the scheduling time interval is 15 min. and is expected to yield its result every time interval, the computation time should be significantly less than 15 min. This is most importantly seen in emergencies, such as an unexpected transition to island mode when the algorithm has to reschedule and yield its solution rapidly. Grounds for this constraint, we expect that the algorithm has to output the result within 1-2 min. Hence, we have selected Np = 1000 and N = 1000. However, this value is adjustable by operators, depending on their own time constraint.

Scope of the Study
We have considered the net ESS efficiency in detail vis-a-vis the application of the combined MILP-PSO algorithm and model, but acknowledge several assumptions that simplify a portion of the overall model. We have not conducted a power flow analysis on the 55-inch pump system or the applied power flow equations to our model. We also did not consider the startup cost of the diesel generator, since the primary purpose of this paper is to show that the SOC violation and the premature solution are solely caused by the consideration of ESS efficiency as a constant value. The authors deemed that the addition of these particular complex factors would obscure the findings on the critical impact of accurately considering the ESS efficiency as we have clearly demonstrated.
Moreover, it is worthy to try to adopt other metaheuristic algorithms, such as the differential evolution and genetic algorithm. Comparing the superiority between all of the metaheuristic algorithms is out of scope of this paper, but adopting other types of algorithms with a parameter adaptation method could yield an improved performance. These issues remain as future works.

Conclusions
In this paper, the detailed model of ESS efficiency is reflected into the ESS-diesel generator scheduling algorithm for an islanded microgrid. A combined MILP-PSO algorithm is developed to overcome the limitation of the conventional, independent MILP and PSO algorithms, which has resulted in greater efficiency of the diesel back-up generator. Actual electrical consumption data from the 55-inch pump at NELHA are used to simulate microgrid performance to prove the effectiveness of the proposed algorithm. The simulation results show that applying MILP or PSO Since this algorithm is about to be applied to the real test-site where the scheduling time interval is 15 min. and is expected to yield its result every time interval, the computation time should be significantly less than 15 min. This is most importantly seen in emergencies, such as an unexpected transition to island mode when the algorithm has to reschedule and yield its solution rapidly. Grounds for this constraint, we expect that the algorithm has to output the result within 1-2 min. Hence, we have selected N p = 1000 and N = 1000. However, this value is adjustable by operators, depending on their own time constraint.

Scope of the Study
We have considered the net ESS efficiency in detail vis-a-vis the application of the combined MILP-PSO algorithm and model, but acknowledge several assumptions that simplify a portion of the overall model. We have not conducted a power flow analysis on the 55-inch pump system or the applied power flow equations to our model. We also did not consider the startup cost of the diesel generator, since the primary purpose of this paper is to show that the SOC violation and the premature solution are solely caused by the consideration of ESS efficiency as a constant value. The authors deemed that the addition of these particular complex factors would obscure the findings on the critical impact of accurately considering the ESS efficiency as we have clearly demonstrated.
Moreover, it is worthy to try to adopt other metaheuristic algorithms, such as the differential evolution and genetic algorithm. Comparing the superiority between all of the metaheuristic algorithms is out of scope of this paper, but adopting other types of algorithms with a parameter adaptation method could yield an improved performance. These issues remain as future works.

Conclusions
In this paper, the detailed model of ESS efficiency is reflected into the ESS-diesel generator scheduling algorithm for an islanded microgrid. A combined MILP-PSO algorithm is developed to overcome the limitation of the conventional, independent MILP and PSO algorithms, which has resulted in greater efficiency of the diesel back-up generator. Actual electrical consumption data from the 55-inch pump at NELHA are used to simulate microgrid performance to prove the effectiveness Energies 2020, 13,1898 15 of 17 of the proposed algorithm. The simulation results show that applying MILP or PSO independently to the islanded microgrid causes an SOC violation in the practical microgrid and also contributes to premature solutions that hinder efficiency. However, by applying the proposed combined MILP-PSO algorithm, less fuel is used and operational costs can be decreased by 0.53-0.6% by eliminating the SOC violation.
From a resilience standpoint, this greater efficiency results in longer operation of the back-up systems in islanded mode. Therefore, optimized resource scheduling, as described herein, can help to fulfill the intent of Hawaii's Act 200 regarding microgrids adding valuable services to the grid and energy resiliency.

Conflicts of Interest:
The authors declare no conflict of interest. Local and global best positions for X, respectively.