Abstract

To solve problems such as the high cost of microgrids (MGs), balance between supply and demand, stability of system operation, and optimizing the MG planning model, the energy storage system (ESS) and harmony search algorithm (HSA) are proposed. First, the conventional MG planning optimization model is constructed and the constraint conditions are defined: the supply and demand balance and reserve requirements. Second, an ESS is integrated into the optimal model of MG planning. The model with an ESS can solve and identify parameters such as the optimal power, optimal capacity, and optimal installation year. Third, the convergence speed and robustness of the ESS are optimized and improved. A case study comprising three different cases concludes the paper. The results show that the modified HSA (MHSA) can effectively improve the stability and economy of MG operation with an ESS.

1. Introduction

Distributed powers, loads, energy storage systems (ESS), and control devices are combined using microgrids (MGs) to form a single controllable power generation and distribution system, supplying electricity and heat to users simultaneously. With operational control, energy management, and other key technologies, MGs can be connected to the grid or run separately. These approaches reduce the adverse effects of an intermittent distributed power supply to the distribution network and maximize the use of distributed power output to improve reliability and power quality. In recent years, MGs have been joined by smart-energy comprehensive-utilization LAN networks, which offer superior performance when using wind power, solar photovoltaic (PV), and other sources of renewable clean energy power generation with a high development rate. Due to the reverse distribution of renewable energy power generation and customer power demand, the balance between supply and demand is challenging to meet, and an auxiliary power source for renewable energy power generation is necessary. Based on the peak-valley conditions of the load curve, ESS can effectively flatten the peak-valley difference by optimizing the charge-discharge behavior. Therefore, ESS are widely used in MGs. The operating characteristics of MGs can be affected, however, in the case of a large-scale ESS with its high initial investment cost. The study of how to optimize MG planning with ESS has both important theoretical value and practical significance.

MG demonstration projects have been conducted in many countries [1]. More than 400 MGs have been constructed, are under construction, or are awaiting construction. The US Distributed Energy Technology Laboratory (DETL) analyzes the efficiency of distributed generation (DG), monitors the changes in output, and searches the impact on MGs caused by load variation [2]. MG Manheim in Germany is located in a residential area, containing six PV units [3]. This MG tests the decentralized controls with controls based on agents. The MG demonstration project in Kyotango, Japan, is aimed at MG energy management and power quality control [4]. Relative to those of developed countries, studies of MG technology in China started late. The current demonstration projects can be divided into remote MGs, island MGs and urban MGs [5]. The new energy MG demonstration area in Turpan, Xinjiang, is currently the largest and most comprehensive application in China and is an integral project examining the use of solar energy in buildings [6]. The MG at Dangan Island is the first independent renewable power station in China. This MG can use wave energy to desalinate 60 t/day of seawater [7]. The MG ESS at the Nanjing Power Supply Company can smooth output fluctuations of wind and light energy and switch the grid-connected system to off-grid mode freely in the system [8].

At present, the optimization method of MGs with ESS considers primarily economic characteristics, response characteristics, and environmental protections. Reference [9] considers the environmental costs and reliability constrictions from the angle of minimizing investment and optimizes the power supply capacity for MGs to operate an entire year in islands. Reference [10] describes the reliability of MGs. Based on economic dispatching and considering system reliability, the energy storage optimization model is established in this literature. Reference [11] aims at developing a wind storage system and considers the influence of the wind power penetration rate, energy storage efficiency, and diesel generator operation strategy from the perspective of minimizing power supply costs. A stochastic optimization method is used to obtain the optimal energy storage capacity, and the corresponding sensitivity analysis is conducted. Considering economy and reliability, [10] establishes the objective function and can obtain the optimal capacity disposition of the ESS for different types of MGs. The objective of [12] is to maximize net profit over a maximized lifetime. A power generation planning model, including a low-carbon economy MG system, is established. In [13], a stochastic model is proposed for the coordinated scheduling of combined heat and power units in MGs. This model also considers wind turbine and PV units. Based on the cost formula, [14] identifies the optimal size of battery energy storage in operational management. Reference [15] proposes a multiobjective energy management system in the short term with the presence of renewable energy. This system can optimize the performance of MGs. Reference [16] seeks to optimize the random behaviors of wind and solar energy in MGs in the short term and with the presence of renewable energy sources. The response loads involved in the operating costs and pollutant emissions are also considered. An MG optimizing model is proposed in [17]. The model integrates microhydropower and renewable-energy-driven power plants with PV systems connected to the grid system. References [18, 19] establish an MG with electric vehicles and distributed power generation, optimize its constraints, and propose an improved general type 2 fuzzy logic set (GT2FLS) and harmony search algorithm (HSA) to minimize the frequency deviation of the MG on the load disturbance. In [20], a robust control strategy for an MG with electric vehicles and DG is introduced. This strategy guarantees the stability and robustness of the system and can be applied to different MG configurations. With the development of smart grid technology, user demand response [21], real-time price [22], and other factors are also considered in MG optimal scheduling models.

Existing studies, however, have the following two deficiencies: the balance between supply and demand is usually considered in constraints, but the system reserve problem is not [23]. Based on the reliability of the system, the total reserve capacity determined is typically 25%–30% of the maximum load in the MG system [24]. As a smart comprehensive multienergy utilization LAN network, the reserve system should be fully met. Regarding the selection of an appropriate algorithm, existing studies use analytical methods [25], numerical algorithms [26], and other traditional optimization algorithms in general. These algorithms require improvement with regard to their convergence speed and calculation results. The limitations of traditional optimization methods have appeared, and the scale and complexity of optimization problems are increasing gradually. Additional advanced planning studies on MGs have used heuristic intelligent optimization algorithms [27] such as the genetic algorithm [28], particle swarm optimization (PSO) [29], enhanced gravity search algorithm (EGSA) [30], and HSA [31], to solve the problems; however, these algorithms still have room to improve in terms of convergence time, optimal problem searching, and results. Thus, the contributions of this study are as follows:(i)An optimization model for MG planning is established with the objective function of the minimum operating cost in the scheduling period. The operational costs consist of the fuel cost, unit operation cost, and power purchase cost. In addition, the model considers the supply and demand balance constraint and the system reserve constraint.(ii)An optimization model for MG planning with ESS is proposed to enhance the stability and economy of MG operation. The model takes the scale constraint and operational constraint of ESS operation as the new constraint conditions.(iii)A modified harmony search algorithm (MHSA) is proposed. To apply the coordination search ability and overcome the limitations of the harmony search range, a subharmony memory is constructed to improve the algorithm’s adaptability. The algorithm could increase the convergence speed and reduce the total cost.

The remainder of this paper is organized as follows: Section 2 constructs an optimization model for MG planning with the objective function of minimum operation cost. In Section 3, an optimization model of MG planning with ESS is established, including the objective function and constraints. Section 4 uses the MHSA to enhance the adaptability and expand the search range. Three simulation cases are established to demonstrate the validity of the MHSA in Section 5. Section 6 highlights the main conclusions of this study.

2. Basic MG Planning Optimization Model

Reasonable MG planning optimization can enhance economic benefits, optimize the overall power flow, and improve power quality. In this section, an optimization model of MG planning is established.

2.1. Objective Function

The model takes the minimum MG operation cost as the objective function, which can be calculated as shown in where is the indexed year; is the planning cycle; represents MG operational costs including the unit commitment cost, fuel cost, and unit operation cost; is the indexed hour; is the index for DG units; is the number of DG units; is the fuel cost of unit ; is the output power of DG unit at hour in year ; is the operational cost of PV power generating ; is the operational cost of wind turbine ; is the power purchasing cost of MG from the main network; is a binary variable; is the revenue of MG power sales for the main network; is a binary variable; is the discount rate; and is the index for the years of interest.

2.2. Constriction Conditions

The MG planning model is constrained by many factors. In this section, the supply and demand balance constraints and system reserve constraints are considered.

2.2.1. Supply and Demand Balance Constraint

When the DG generation capacity cannot meet the energy demand at specific hours, the MG requires the power to be transported from the main network: where is the prediction value of PV output power at hour ; is the prediction value of WPP power output at hour ; is a binary variable; is the load growth rate; and is the demand forecast value at hour .

2.2.2. MG Reserve Constraint

The distributed power supply is a mutual reserve of the power grid, which has the advantages of high reliability and energy efficiency. The MG reserve should satisfy no less than 15% of the load demand per hour. The following conditions should also be met:where is the reserve of the DG unit at hour in year ; is the reserve of ESS at hour in year ; is the prediction error of the load demand; and are the prediction errors of PV and WPP, respectively; is the maximum output power of unit ; is the ESS charging state at hour in year ; is the ESS capacity in year ; and is the ESS charging and discharging efficiency.

3. MG Planning Optimization Model with ESS

In this section, the optimization model for MG planning with ESS is established based on the basic model. The model can be used to solve the problems of the optimal power, optimal capacity, and the optimal installation year for MGs with ESS.

3.1. Objective Function

The operating cost of MGs and the investment cost of the ESS are considered in this planning model for MGs with ESS. The objective of this study is to address the ESS installation planning problem in existing MGs; thus, the investment cost of MGs is not included. The total cost in the planning cycle is taken as the objective function. The total cost includes the operation cost of MGs and the investment cost of the ESS:where is the objective function of the investment cost; is the MG operating cost; and is the ESS installation and operational costs.

The ESS cost includes the installation cost and the operational cost. The installation cost is calculated as follows:where is the ESS installation cost; is the variable installation cost associated with the rated power; is the power output of the ESS in installation year ; is the variable installation cost related to the capacity size; is the capacity of the ESS in installation year ; represents ESS not installed in year ; and is the fixed installation cost. The operation cost of ESS is predominantly the system operation cost and fixed operation cost, which can be calculated as follows:where is the ESS operation cost; is the fixed operation cost; is the rated power in year ; is the variable operation cost; and is the ESS power output at hour in year .

3.2. Constriction Conditions

The supply and demand balance constraint and reserve constraint must still be considered in the optimization model for MG planning with ESS. In addition, the ESS scale constraints and operational constraints should also be considered in the model.

3.2.1. Scale Constraints

The scale constraints, including installation power constraints, capacity scale constraints, and energy-scale constraints at a specific power size, can be calculated by (7) as follows: where is the ESS rated power; is the ESS rated capacity; and and are the ESS maximum and minimum efficiency, respectively.

3.2.2. Operational Constraints

The ESS operational constraints include limits on power charging and discharging levels, initial charging state constraints, and power limitations and capacity constraints. They can be described as follows: where is the discharging binary variable. When , the ESS is discharging at hour in year . When , the ESS is not discharging. is the charging binary variable. When , the ESS is charging at hour in year , and when , the ESS is not charging. is the index of discharging depth.

4. Improved Harmony Search Algorithm

The HSA is a new type of intelligent optimization algorithm that can find optimal solutions more easily. A simple searching process and strong global searching ability are the advantages of the HSA [32]. This paper will introduce the HSA, expand the search range, and improve the coordination of local and global search to solve the proposed model [33].

4.1. Harmony Search Algorithm

Z. W. Geem et al. proposed a heuristic intelligent optimization algorithm called the HSA [34]. The specific calculation steps are introduced as follows.

Step 1. The objective function, constraints, and basic parameters of harmony search are determined. ①   is the number that could be saved by harmony memory (HM). The number should be less than the number of feasible solutions. ②   is the preserving probability of harmonic memory, specifically the probability of preserving the solution from HM when a new solution emerges. ③   is the probability of fine-tuning the disturbance in a portion of the solution. ④   is the number of improvised operations, specifically the number of cycles.

Step 2. HM is initialized. is the number of initial solutions generated randomly in the optimization problems. is an HM gathered by initial solutions when iterative algebra . This parameter can be expressed as follows:where is the th solution vector; is the th subvector of the th solution vector; and is the function value of the th solution vector, with and .

Step 3. New solutions are generated. New harmonic vectors are generated in the following three ways: ① Some of the solutions in HM are preserved with a probability of . In other words, the new solution comes from the collection of the th solution component in the memory . ② A new solution is generated randomly with a probability of . ③ Part of in is disturbed by the above method. The disturbance principle can be calculated aswhere is the bandwidth; rand is the random number between 0 and 1; and is the th new solutions after disturbance: where is the number of solutions and rand is a random number between 0 and 1. The new harmony requires tonal tuning if its value comes from HM.

Step 4. The memory is updated. The worst solution is replaced by the new one if the new solution is better than the worst in HM, and then the new HM is obtained. Otherwise, the original solution is kept unchanged.

Step 5. The algorithm ends if the program reaches the predetermined number of iterations I. If not, the algorithm returns to Step 3.
Figure 1 shows the algorithm flow chart.

4.2. Algorithm Improvement

HSA has the advantages of a simple search process, strong global searching ability, and finding optimal solutions easily, but the convergence speed is slow. The adaptability is poor, and the search range is limited. In this section, the MHSA is proposed to improve the convergence speed and robustness of the HSA [35].

4.2.1. The Improvement of Self-Adaptability

MHSA adds the optimal solution weight (0.4–0.6) in Step 3, and the remaining weight is divided equally by other solutions. As the number of iterations decreases, the fixed bandwidth also decreases. The decreasing of the fixed bandwidth can be described as follows:where Z is the maximum range of the function; LI is the current number of remaining iterations; and is the maximum number of iterations. By introducing this adaptive strategy, the local and global searching ability of the HSA can be improved to achieve optimization.

4.2.2. The Establishment of Sub-HM

The process of creating the sub-HM is as follows [36]: ① The main HM is established as a sub-HM searched by the standard iterative. ② An auxiliary harmony searching iteratively from the opposite direction of the main HM is established. The algorithm divides all solutions of HM into two mutually independent sublibraries after being randomly initialized, rather than updating the entire solutions. According to the standard HSA, one of the sublibraries of HM searches iteratively. The other one searches from the opposite end, fully exploring the search range and identifying useful information within the search field.

The process of MHSA in MG planning with ESS is described as follows:

() MG planning with the ESS and its algorithm parameters are initialized.

() HM is initialized, and the harmony matrix is generated. After random initialization, HM is divided into the main HM and auxiliary HM. The value of each harmony is calculated.

() Based on the main HM and the auxiliary HM, a new HM can be generated through the methods of harmony preservation, pitch adjustment, and random selection. In the process of generating the new harmonic vector, three principles will be used: harmony reservation, tone control, and random selection.

() The next-generation HM is updated according to the algorithmic principle. The optimal solution weight is added; is self-adaptive in this step.

() The criterion of terminating the proofreading algorithm: Take the convergence principle as reference, and judge whether the algorithm satisfies the convergence condition. If not, Steps 3 and 4 will be repeated until the algorithm satisfies the convergence condition or reaches the maximum value.

5. Case Simulation

Three simulation cases are established to verify the applicability of the proposed model and algorithm. The DG net power generation and reserve in different cases are assumed. The model is calculated by MHSA and compared with HSA and PSO.

5.1. Basic Data

A small MG in China is chosen as the analytical object. This MG system is a small commercial and industrial MG. The load characteristics are sensitive and require a relatively high level of power supply reliability and quality. The MG consists of two diesel generators (namely, DG1 and DG2) with 250 kW installed capacity, a PV generator DG3 with a capacity of 100 kW, and a wind generator DG4 with a capacity of 150 kW. The upper climbing power and lower climbing power of DG1 and DG2 are not more than 50 kW, the start-shut time of DG1 and DG2 is not less than 30 minutes, and the start-shut cost of DG1 and DG2 is ¥120. PSO is a type of bionic optimization algorithm [37] based on the swarm intelligence theory with the advantages of simplicity, high precision, and fast convergence. PSO is widely used in neural network construction, power system planning, and fuzzy controls [38]. Table 1 illustrates the parameter values of the DG units in the MG.

Lead-acid batteries [39] are used in the MG. The users are predominantly residents, public utilities, and small business users. Table 2 shows the values of the model parameters. The data in the table are based on the general standard of [40].

Data from a typical summer day are selected to calculate the three scenarios and ensure the load distribution, size, and standby requirements are consistent. The load demand of the MG system on a typical summer day is as follows: the power consumption is low from 22:00 to 7:00 because the users are predominantly residential users, enterprise users, and small business users. The power consumption is high during the daytime and peaks at noon and in the evening. Figure 2 shows the distribution of the MG’s load demand and reserve demand.

The parameters for MHSA are set as follows: , , , , and . The parameters for HSA are set as follows: H = 50, , , , and . The parameters for PSO are as follows: the population size is 50; the learning factors are ; the number of initial iterations is 1; the maximum number of iterations is 200; the inertia weight is 0.9; and the random number is .

5.2. Simulation Case Setting

To analyze the ESS model in the MG and improve the effectiveness of the HSA, this paper establishes three simulation scenarios and makes assumptions regarding the DG net power generation and reserve condition based on different scenarios.

Case 1 (reference scenario). The power generation of MG is sufficient to meet the reserve requirements. The reference scenario is used to verify the effectiveness of the proposed algorithm and is used primarily as a reference. Case 1 provides a comparison for the effects that the ESS has on MG construction optimization.

Case 2 (reserve scenario). The power generation of the MG is normally sufficient but cannot meet the reserve requirements. The MG would be unstable under this scenario. At this point, the ESS may be an alternative reserve DG to optimize the operation of the MG and meet reserve requirements.

Case 3 (extreme scenario). The power generation of MG is insufficient and cannot meet the reserve requirements. In this scenario, the ESS may discharge to meet the demand load in the peak, replacing the DG reserves to optimize system operation. The system reserve can be satisfied by ESS discharge.

5.3. Simulation Results
5.3.1. Results in Case 1

Case 1 is the reference used to both verify the validity of the proposed algorithm and provide an object of comparison to analyze the effect of the ESS on MG construction optimization. In this section, three methods, MHSA, HSA, and PSO, are chosen to solve the model. The generation capacity and reserve requirement are satisfied in this case. The methods can analyze the optimization effect of the ESS on the MG. Figure 3 shows the comparison of the convergence conditions of the MHSA, HSA, and PSO for Case 1.

The convergence rate of MHSA in scenario 1 is higher than that of the HSA and PSO. Table 3 shows the comparison of the computation time of the MHSA, HSA and PSO in Case 1.

In the calculation of the speed of the comparison, MHSA is also faster than HSA and PSO in Case 1. Table 4 comparatively analyzes the optimal installation decisions and related costs predicted by the MHSA, HSA, and PSO in Case 1.

In Case 1, because MG can satisfy both the load and reserve demand, the ESS total cost is lowest in the second year and is ¥340,318,800. Relative to the latter two types of algorithms, the MHSA saves ¥3788 and ¥2208. The corresponding rated power and capacity are 69 kW and 92 kW. Figure 4 shows the supply and demand condition in Case 1.

The net power generation equals the load demand of MG without ESS, which means that the MG power generation is sufficient to meet the load demand. The ESS will charge when the load demand is low at hour 3 and hour 4. The MG power generation can meet the load demand when the load demand is high, but to optimize system operation, the ESS will discharge instead of beginning to reserve DG to optimize the DG units’ operation and extend their service life. When , 18, and 19 and the demand load is high, the ESS will discharge instead of running DG units to optimize system operation. Figure 5 shows the reserve condition in Case 1.

The DG reserve is equal to the MG system reserve requirements when the ESS are not considered, implying that the DG reserve is sufficient to meet reserve requirements. At this point, the MG system can also meet the requirements without ESS. When an ESS is installed, however, the operation of the DG reserve can be replaced by the ESS to optimize system operation. The use of ESS supports replacing the operation of the DG reserve with the system reserve when , 11–13, 17–20.

5.3.2. Results in Case 2

Case 2 is the reserve case and is used to verify the effects of ESS on system reserves and MG optimization when the system is underutilized. Figure 6 shows the supply and demand conditions in Case 2.

The net power generation without ESS is equal to the MG’s load demand, implying that the MG generation capacity is sufficient to meet the load demand. At this time, the ESS charge during valley hours, namely, , and discharge at the times of peak load, namely, , and 17–19. After continuous discharging, it is necessary to charge when the load is slightly lower; that is, . In this case, the ESS discharge in the peak load periods to replace the DG reserve and optimize MG operation. Figure 7 shows the reserve condition in Case 2.

Figure 6 shows that the reserve system cannot meet the requirements. The DG reserve is lower than reserve requirement without ESS at h = 12–14 and 17–20, indicating that the DG reserve cannot meet the reserve requirement. In this case, ESS play a crucial role in supporting the reserve to replace the operation of the DG reserve, and ESS can completely replace the DG reserve unit when h = 9, 13, and 19. When h = 8–20 and 23, the installation of ESS enables MG operation to meet the reserve demand and to replace the DG reserve to optimize MG operation.

5.3.3. Results in Case 3

Case 3 is the extreme case for verifying ESS’ effectiveness in optimizing MG operation. In this case, the power generation capacity is insufficient to meet the reserve requirement. Figure 8 shows the supply and demand condition in Case 3.

When h = 12 and 18–20, the net power generation is less than the load demand without ESS. In this scenario, the MG generation cannot meet the load demand. At this point, the ESS charge at the real and relative valley hours, h = 3, 4, 15, 16, and 22. At peak hours, namely, h = 11–13 and 17–20, the ESS discharge to meet the demand load and replace the DG reserve to optimize system operation. Figure 9 shows the reserve condition in Case 3.

The DG reserve cannot meet the reserve requirements without the installation of ESS when h = 8–11 and 20, indicating that the DG reserve in the MG system cannot meet the reserve requirements. The reserve even drops to a negative value when h = 10 and 11. All DG reserve units should be started to supply the demand load, and the reserve requirement cannot be met. The system reserve is satisfied when h = 4, 5, and 8–23 after installing ESS. The MG system can meet system reserve requirements through ESS completely when h = 4, 5, 12, 13, and 17–20.

5.3.4. Comparative Analysis

To analyze the application of this model in three scenarios, this section selects data from a typical summer day to apply to the processing model (the load distribution, size, and reserve requirements are the same in all three cases). This section also compares the optimal installation decisions and the related cost results of the MHSA, HSA, and PSO. The reserve demand curve and the load demand curve of the MG system are essentially the same because the system reserve capacity increases along with the increase in users’ load demand. This phenomenon provides sufficient reserves for high load demand. Table 5 compares the optimal installation decisions and related costs predicted by the MHSA, HSA, and PSO in Case 2.

In Case 2, the MG system cannot meet reserve requirements; thus, the total cost of ESS must be lowest in the first year, ¥37,870,166, and the total cost calculated by the MHSA is ¥2567 and ¥2799 less than the costs in the other two algorithms. The corresponding rated power and capacity are 128 kW and 197 kWh. Table 6 compares the optimal installation decisions and related costs predicted by the MHSA, HSA, and PSO in Case 3.

In Case 3, the MG system cannot meet the most basic load demand; thus, the total cost of ESS installation must also be lowest in the first year, ¥43,967,861 as calculated by MHSA. Compared with the costs of the latter two algorithms, MHSA could save ¥2467 and ¥4934. The rated power and capacity of ESS are 249 kW and 387 kWh.

6. Conclusions

MG has become a smart-energy comprehensive-utilization and a multienergy complementary system with wide application potential across the world. ESS are an important part of the MG system. Approaches to optimize MG planning with ESS have important theoretical value and practical significance. The paper studies the problem of MG planning with ESS and solves the model using MHSA. The results are as follows:

() If the operating cost of MG and the investment cost of ESS were considered, the proposed model could find the optimal scheme of MG planning with ESS. Further, ESS could support MG systems in meeting load demand and reserve requirements under three cases by timely adjustment of the charge-discharge power. ESS could also enhance the stability and economy of MG operation.

() An MHSA is proposed to overcome the slow convergence rate and poor robustness of the HSA. The improvement occurs primarily through the promotion of the self-adaptability and establishment of the sub-HM. By analyzing scenarios, the convergence rate, computation time, and economy of MHSA are found to be significantly higher than those of the traditional HSA and PSO.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

This paper is supported by the National Science Foundation of China (Grant nos. 71273090, 71573084) and Beijing Municipal Social Science Foundation (16JDYJB044).