Optimal Capacity Configuration of a Hybrid Energy Storage System for an Isolated Microgrid Using Quantum-Behaved Particle Swarm Optimization

The capacity of an energy storage device configuration not only affects the economic operation of a microgrid, but also affects the power supply’s reliability. An isolated microgrid is considered with typical loads, renewable energy resources, and a hybrid energy storage system (HESS) composed of batteries and ultracapacitors in this paper. A quantum-behaved particle swarm optimization (QPSO) algorithm that optimizes the HESS capacity is used. Based on the respective power compensation capabilities of ultracapacitors and batteries, a rational energy scheduling strategy is proposed using the principle of a low-pass filter and can help to avoid frequent batteries charging and discharging. Considering the rated power of each energy storage type, the respective compensation power is corrected. By determining whether the charging state reaches the limit, the value is corrected again. Additionally, a mathematical model that minimizes the daily cost of the HESS is derived. This paper takes an isolated micrgrid in north China as an example to verify the effectiveness of this method. The comparison between QPSO and a traditional particle swarm algorithm shows that QPSO can find the optimal solution faster and the HESS has lower daily cost. Simulation results for an isolated microgrid verified the effectiveness of the HESS optimal capacity configuration method.


Introduction
The optimal configuration of capacity is the key to a microgrid's integrated control and energy management [1].The energy configuration has a significant influence on the effective utilization of renewable energy, and the stability and economics of a microgrid, especially for an isolated microgrid.On the one hand, if the grid does not have sufficient energy storage capacity, the excess power generated by wind turbines or photovoltaic (PV) panels cannot be adequately stored.This would cause energy waste.On the other hand, if the capacity is large, the cost of investment will increase.In addition, the energy storage device may be in a low charge state for a long time, which will have a negative impact on its life and performance.
Common types of energy storage include: battery, ultracapacitor, superconducting energy storage and flywheel energy storage, etc.Many researchers have investigated optimal capacity configurations of energy storage devices.In most studies on the optimal capacity configuration of hybrid energy storage systems, a microgrid is considered a grid-connected operation.Their objective was to calculate the capacity and smooth fluctuations in the tie-line power flow [2,3].However, the isolated microgrid has higher requirements for the control of an energy storage system.It is difficult to deal with the change of operating conditions and the longer use of single storage [4].Related research [5,6] shows that the combination of high-power density energy storage devices, such as ultracapacitors and batteries, can make full use of their complementary characteristics, and improve the power output of energy storage.Due to the high energy density of the battery and the high power density of the ultracapacitors, this paper selects the ultracapacitor and the battery as hybrid energy storage systems (HESSs) for an isolated microgrid.
The primary target of an isolated microgrid is to enhance the accouplement between the generated power and the load.To optimize the HESS capacity in an isolated microgrid with respect to the load characteristics, a hybrid configuration scheme for the ultracapacitors and batteries based on cost analysis was proposed in [7].An optimization model was constructed in [8], which considered the lowest average annual cost of the HESS based on life-cycle cost.From the perspective of intelligent algorithms, simulated annealing was combined with particle swarm optimization (PSO) in [9] to calculate the HESS capacity.Reference [10] moved away from a single cost target, and proposed a multiobjective optimization method.An adaptive weighted PSO was used to find the optimal solution.The traditional particle swarm optimization algorithm has more control parameters, which cannot converge to the global or even local optimal solution.If the control parameter is not suitable, it is highly likely that the optimal solution will not be found in the optimization process.Quantum-behaved particle swarm optimization (QPSO) has fast convergence rates and less control parameters, so it has been applied to power network planning, digital filters design [11,12].
In this paper, an isolated microgrid (Figure 1) that has typical loads, a HESS and renewable energy resources is considered.A new QPSO method is used to optimize HESS capacity.Based on the low-pass filtering principle, an energy scheduling strategy is proposed to allocate the energy of batteries and ultracapacitors.The objective is to minimize the daily cost of the HESS while guaranteeing that the HESS and microgrid can maintain normal operations.A traditional PSO and QPSO is compared.Through the analysis of the configuration results of a case study in north China, the superiority of QPSO algorithm is proved compared with traditional PSO.A simulated model of a microgrid verified the rationality of the HESS optimal capacity configuration method.
was to calculate the capacity and smooth fluctuations in the tie-line power flow [2,3].However, the isolated microgrid has higher requirements for the control of an energy storage system.It is difficult to deal with the change of operating conditions and the longer use of single storage [4].Related research [5,6] shows that the combination of high-power density energy storage devices, such as ultracapacitors and batteries, can make full use of their complementary characteristics, and improve the power output of energy storage.Due to the high energy density of the battery and the high power density of the ultracapacitors, this paper selects the ultracapacitor and the battery as hybrid energy storage systems (HESSs) for an isolated microgrid.
The primary target of an isolated microgrid is to enhance the accouplement between the generated power and the load.To optimize the HESS capacity in an isolated microgrid with respect to the load characteristics, a hybrid configuration scheme for the ultracapacitors and batteries based on cost analysis was proposed in [7].An optimization model was constructed in [8], which considered the lowest average annual cost of the HESS based on life-cycle cost.From the perspective of intelligent algorithms, simulated annealing was combined with particle swarm optimization (PSO) in [9] to calculate the HESS capacity.Reference [10] moved away from a single cost target, and proposed a multiobjective optimization method.An adaptive weighted PSO was used to find the optimal solution.The traditional particle swarm optimization algorithm has more control parameters, which cannot converge to the global or even local optimal solution.If the control parameter is not suitable, it is highly likely that the optimal solution will not be found in the optimization process.Quantumbehaved particle swarm optimization (QPSO) has fast convergence rates and less control parameters, so it has been applied to power network planning, digital filters design [11,12].
In this paper, an isolated microgrid (Figure 1) that has typical loads, a HESS and renewable energy resources is considered.A new QPSO method is used to optimize HESS capacity.Based on the low-pass filtering principle, an energy scheduling strategy is proposed to allocate the energy of batteries and ultracapacitors.The objective is to minimize the daily cost of the HESS while guaranteeing that the HESS and microgrid can maintain normal operations.A traditional PSO and QPSO is compared.Through the analysis of the configuration results of a case study in north China, the superiority of QPSO algorithm is proved compared with traditional PSO.A simulated model of a microgrid verified the rationality of the HESS optimal capacity configuration method.

Mathematical Models of Microsources
This paper presents mathematical models of wind and photovoltaic power generation [13,14].The actual power of the wind turbine is denoted as Pwt,t, defined as:

Mathematical Models of Microsources
This paper presents mathematical models of wind and photovoltaic power generation [13,14].The actual power of the wind turbine is denoted as P wt,t , defined as: where v r is rated wind speed; v ci is cutting wind speed; v co is cut-out wind speed; v(t) is actual wind speed; P r is rated power; v ref (t) is reference wind speed; h is tower height; h ref is reference height (9 m), and α = 1/7.
The power of a single photovoltaicunit (PV) is denoted as P pv,t , defined as: where G STC is the radiation intensity (1 kW/m 2 ); P STC is maximum test power; G is practical light intensity; T STC is reference temperature (298 K); and T C is practical temperature; k is power coefficient (−0.47%/K).
Considering in charging and discharging processes the energy changes, the state of charge (SoC) for the energy storage system is modelled as follow.
During charging: And during discharging: Here, SoC bat/uc,t is the SoC of batteries or ultracapacitors at time t; P bat/uc,t is the output power; η bat/uc,c and η bat/uc,d are the charging and discharging efficiencies.When P bat/uc,t is positive, batteries or ultracapacitors are discharged.E bat/uc is the capacity of each energy storage device and ∆t is the duration of each interval.

Energy Scheduling Strategy
The function of hybrid energy storage is to regulate the energy and balance the supply and demand of the isolated microgrid.That is: where ∆P t is the missing power; P load,t is the load power.
Based on the different characteristics of ultracapacitors and batteries, an energy scheduling strategy is proposed due to the fluctuation of wind and PV output [15].Ultracapacitors are used to compensate for frequent power fluctuations, because an ultracapacitor has high response speed and high power density.Batteries are used to compensate for slight fluctuations in power, because a battery has slow response and low power density.Low-pass filtering is used.The frequent charging and discharging of the batteries are avoided with the help of ultracapacitors.
The optimal power of the battery (P * bat,t ) is obtained by low-pass filtering principle.Then, P * bat,t is corrected considering the rated power.By determining whether the SoC reaches its limit after compensation, the value is corrected again.These revision processes are described in Figure 2, which considers the battery discharge process.P * bat,t is the first corrected value.P bat,N is the rated battery power.The ideal battery power is: where In Figure 2, P bat,t−1 is the actual battery power.The time constant of the first-order low-pass filter is T L .f L is the compensation boundary frequency for accumulators and ultracapacitors.It can be obtained through analyzing the frequency spectrum of P * HESS .The frequency range of batteries control power components is 0~f L .Ultracapacitors control power components with frequencies higher than f L .
In Figure 2, Pbat,t−1 is the actual battery power.The time constant of the first-order low-pass filter is TL.fL is the compensation boundary frequency for accumulators and ultracapacitors.It can be obtained through analyzing the frequency spectrum of P * HESS .The frequency range of batteries control power components is 0~fL.Ultracapacitors control power components with frequencies higher than fL.

Objective Function
The objective is to minimize the daily HESS cost, considering the one-time investment cost, operational costs, and maintenance costs.That is: ( ) where Cd is average daily cost of hybrid energy storage device; CP is total annual investment cost; CO is annual operating cost; and CM is annual maintenance cost.They all affect the choice of capacity.That is: where Cbat ($/kWh) is battery price, fObat is operation coefficient, fMbat is maintenance coefficient, fPbat is battery depreciation coefficient.Cuc, fOuc, fMuc, fPuc are price, coefficients of the ultracapacitors respectively.The depreciation coefficient is:

Objective Function
The objective is to minimize the daily HESS cost, considering the one-time investment cost, operational costs, and maintenance costs.That is: where C d is average daily cost of hybrid energy storage device; C P is total annual investment cost; C O is annual operating cost; and C M is annual maintenance cost.They all affect the choice of capacity.
That is: where C bat ($/kWh) is battery price, f Obat is operation coefficient, f Mbat is maintenance coefficient, f Pbat is battery depreciation coefficient.C uc , f Ouc , f Muc , f Puc are price, coefficients of the ultracapacitors respectively.The depreciation coefficient is: l is the service life.d is the depreciation rate.

HESS Constraints
SoC should be within reasonable limits, which is capacity restriction: and The initial SoC can be set to 0.5 to guarantee that the energy storage system is discharged normally when power is in short supply.
For the battery charging and discharging, P batc,t,max and P batd,t,max are the maximum allowable values, defined as: and P ucc,t,max and P ucd,t,max are the equivalent values for the ultracapacitors, defined as: and

Constraints on the Microgrid Operation
The energy produced at any moment in the power system is equal to the consumed.That is: S lack,t is power shortage, and S waste,t is power surplus.They can take values either 0 or 1.They cannot be 1 at the same time.P lack,t is system loss power.P waste,t is surplus power.
The reliability of power supply is reflected by the loss of power supply probability (LPSP).The smaller LPSP, the more reliable the system is.The waste rate of energy is reflected by surplus of power supply probability (SPSP).The smaller the SPSP, the more solar power generation is used.LPSP and SPSP are defined as: The HESS capacity should satisfy the LPSP and SPSP indexes, i.e., both should be less than LPSP max and SPSP max .

QPSO Algorithm
A QPSO algorithm is used for solving the above optimization model.E uc and E bat are the optimal variables.Equation (10) is the fitness function.The results of E bat and E uc should be obtained under the constraints that minimize (10).The form of the constraint is the penalty functions.
The particle swarm optimization algorithm, as a swarm intelligence optimization algorithm, is not only simple and easy to implement, but also has a fast convergence speed, which is a robust global search algorithm.Compared to the traditional deterministic optimization algorithm, the particle swarm algorithm does not depend on the problem characteristics, and does not require the objective function or constraint function to be analytic, more do not require differentiable objective function is continuous or higher order.Therefore, the use of traditional optimization methods are unable or difficult to deal with the highly nonlinear, nondifferentiable, multimodal, multivariate problems, especially when the objective function is discontinuous or micro, or is affected by the noise without clear explicit mathematical form.As such, using the particle swarm algorithm for solving has great advantage.But traditional the PSO algorithm has some shortcomings.For example, it is sometimes difficult to converge to a global or local optimum and the standard PSO algorithm is not guaranteed to converge to the global optimal solution or local optimal solution with probability 1.From the perspective of quantum mechanics, QPSO presents a method for solving optimization problems.Each particle is in a quantum state in QPSO.Each state is represented by its wave function, not the position and velocity vector used in the PSO [16].In QPSO, there is no velocity vector.X i,j (k + 1) is defined as the position of particle i at the (k + 1)th iteration.It is updated using.
where i (1 ≤ i ≤ M) is the ith particle.M represents potential solutions, is the total number of particles.
The type and quantity of the samples need to be enough to avoid the early convergence of the algorithm.j (1 ≤ j ≤ 2) is the dimension of the solution space.k max is the maximum number of iterations.β is the contraction-expansion coefficient, used to control the convergence speed.Except for the population size (M) and number of iterations (k), this is the only controlled parameter.Parameter β is usually fixed or linearly reduced.p i,j (k) represent the local attractor and is: where φ j (k) is a random number uniformly distributed in (0, 1).C j (k) are the centres of the best positions of the swarm, represented as: P i,j (k) is the best position of particle i, that is: G(k) is the global best position of the swarm, defined as: where f is the fitness function and g∈{1, 2, . . ., M}.
The steps of the algorithm are as follows: (a) Initialize particles.(b) Set the personal best positions, P i (0) = X i (0).The fitness value of each initial particle was evaluated and the position of the optimal individual in the group was recorded as the global initial optimal position.(c) Calculate the positions of random points using (24), and update new particles using (23).(d) Calculate the fitness values using (9), based on the aforementioned energy scheduling strategy.(e) Update the individual and global optimal location of the particle using ( 26) and ( 27).(f) Determine whether the termination condition is satisfied.If they are, the output is calculated, otherwise return to Step (c).
The optimal capacity of the battery and ultracapacitors can be obtained through the above method, but the local temperature characteristics still need to be considered in the actual selection of the battery and ultracapacitors.The output capacity of the battery can be adjusted according to the local actual temperature conditions [17]: where ∆Q max (T) is the difference between the actual output capacity and the nominal capacity at T; ∆Q max (25 • C) is the difference between the actual output capacity and the nominal capacity at 25 • C; E a (φ) is activation energy; R is the gas time constant; T is local temperature.
Temperature not only affects the selection of battery capacity, but also affects the actual working conditions of ultracapacitors.When temperature changes, the change of ultracapacitor series resistance (ESR) is the main factor affecting the actual working conditions of ultracapacitors.The higher the temperature, the lower the resistance of the series resistance, the higher the actual output voltage of the capacitor [18].The relationship between the series resistance of different ultracapacitors and temperature is not determined mathematically.In practice, it is necessary to find the corresponding data manual of ultracapacitors.

Case Study and Analysis
This paper used the case of an isolated microgrid in north China to verify the proposed method.The wind speed data at the sampling interval of 5 min in the current area can be calculated by the formulas (1) and (2).According to the annual average meteorological data of local light intensity and temperature, Homer software was used to simulate the light data with a 1-h interval.The light data of 5 min sampling interval is obtained by data fitting, and the output power of PV can be calculated by formula (3).The daily load data of 1 h was processed by the same method, and 10% random fluctuation was added to get the corresponding daily load curve.The actual power of the load and the calculated wind/PV output for one day are shown in Figure 3.For this example, the project life was 15 years and the interval time was 5 min.LPSP max was 4%.SPSP max was 12%.The details of HESS are shown in Table 1.

Optimization Results and Analysis
The ideal power value of the HESS is shown in Figure 4.
The spectral analysis of P * HESS is conducted based on the discrete Fourier transform, and the results are shown in Figure 5.
Figure 5 shows that the power amplitudes at lower frequencies are larger than that at high frequencies.A frequency of 0.000081 Hz is used to identify the batteries and ultracapacitors.
In this paper, the population size was M =1 00, and the maximum number of iterations was set to 200.The battery capacities were 7807.84kWh, the ultracapacitor capacities were 1985.16kWh, and the daily cost was $5902.36.
The outputs of the HESS are shown in Figure 6.It shows that the battery power fluctuations are less abrupt.The ultracapacitors are frequently charged and discharged.This is consistent with the above spectrum analysis results.

Optimization Results and Analysis
The ideal power value of the HESS is shown in Figure 4.
The spectral analysis of P * HESS is conducted based on the discrete Fourier transform, and the results are shown in Figure 5.
Figure 5 shows that the power amplitudes at lower frequencies are larger than that at high frequencies.A frequency of 0.000081 Hz is used to identify the batteries and ultracapacitors.
In this paper, the population size was M = 100, and the maximum number of iterations was set to 200.The battery capacities were 7807.84kWh, the ultracapacitor capacities were 1985.16kWh, and the daily cost was $5902.36.
The outputs of the HESS are shown in Figure 6.It shows that the battery power fluctuations are less abrupt.The ultracapacitors are frequently charged and discharged.This is consistent with the above spectrum analysis results.

Optimization Results and Analysis
The ideal power value of the HESS is shown in Figure 4.
The spectral analysis of P * HESS is conducted based on the discrete Fourier transform, and the results are shown in Figure 5.
Figure 5 shows that the power amplitudes at lower frequencies are larger than that at high frequencies.A frequency of 0.000081 Hz is used to identify the batteries and ultracapacitors.
In this paper, the population size was M =1 00, and the maximum number of iterations was set to 200.The battery capacities were 7807.84kWh, the ultracapacitor capacities were 1985.16kWh, and the daily cost was $5902.36.
The outputs of the HESS are shown in Figure 6.It shows that the battery power fluctuations are less abrupt.The ultracapacitors are frequently charged and discharged.This is consistent with the above spectrum analysis results.There were large fluctuations in the ultracapacitor power amplitude for sample points around 100 and 247-this may be because there were shock loads.Batteries are limited for their maximum capacity and could not adequately compensate for these sudden load changes.Ultracapacitors reacted to the power imbalance because they have high power density.
Figures 7 and 8 show the actual HESS power and P * HESS curves for sample points 1-48 and 150-180 in Figure 8.
The actual HESS power and P * HESS coincide in Figure 7.This indicates that the actual HESS power could exactly track P * HESS at the beginning of a day.The power instructions could not be revised because the energy changes are within a reasonable range.There were differences between the actual HESS power and P * HESS in Figure 8. Limited by the batteries' rated power, the maximum charging power of the batteries was 1500 kW.Therefore, the surplus power could not be completely absorbed because the ultracapacitors were limited by SoCuc,max.However, in the iterative operation of the algorithm, the energy overflow rate constraint of There were large fluctuations in the ultracapacitor power amplitude for sample points around 100 and 247-this may be because there were shock loads.Batteries are limited for their maximum capacity and could not adequately compensate for these sudden load changes.Ultracapacitors reacted to the power imbalance because they have high power density.
Figures 7 and 8 show the actual HESS power and P * HESS curves for sample points 1-48 and 150-180 in Figure 8.
The actual HESS power and P * HESS coincide in Figure 7.This indicates that the actual HESS power could exactly track P * HESS at the beginning of a day.The power instructions could not be revised because the energy changes are within a reasonable range.There were differences between the actual HESS power and P * HESS in Figure 8. Limited by the batteries' rated power, the maximum charging power of the batteries was 1500 kW.Therefore, the surplus power could not be completely absorbed because the ultracapacitors were limited by SoCuc,max.However, in the iterative operation of the algorithm, the energy overflow rate constraint of There were large fluctuations in the ultracapacitor power amplitude for sample points around 100 and 247-this may be because there were shock loads.Batteries are limited for their maximum capacity and could not adequately compensate for these sudden load changes.Ultracapacitors reacted to the power imbalance because they have high power density.
Figures 7 and 8 show the actual HESS power and P * HESS curves for sample points 1-48 and 150-180 in Figure 8.
The actual HESS power and P * HESS coincide in Figure 7.This indicates that the actual HESS power could exactly track P * HESS at the beginning of a day.The power instructions could not be revised because the energy changes are within a reasonable range.There were large fluctuations in the ultracapacitor power amplitude for sample points around 100 and 247-this may be because there were shock loads.Batteries are limited for their maximum capacity and could not adequately compensate for these sudden load changes.Ultracapacitors reacted to the power imbalance because they have high power density.
Figures 7 and 8 show the actual HESS power and P * HESS curves for sample points 1-48 and 150-180 in Figure 8.
The actual HESS power and P * HESS coincide in Figure 7.This indicates that the actual HESS power could exactly track P * HESS at the beginning of a day.The power instructions could not be revised because the energy changes are within a reasonable range.There were differences between the actual HESS power and P * HESS in Figure 8. Limited by the batteries' rated power, the maximum charging power of the batteries was 1500 kW.Therefore, the surplus power could not be completely absorbed because the ultracapacitors were limited by SoCuc,max.However, in the iterative operation of the algorithm, the energy overflow rate constraint of There were differences between the actual HESS power and P * HESS in Figure 8. Limited by the batteries' rated power, the maximum charging power of the batteries was 1500 kW.Therefore, the surplus power could not be completely absorbed because the ultracapacitors were limited by SoC uc,max .However, in the iterative operation of the algorithm, the energy overflow rate constraint of the system is implicit in the operation process in the form of penalty function, enough to satisfy the system requirements.
the system is implicit in the operation process in the form of penalty function, enough to satisfy the system requirements.

Comparison of Traditional PSO and QPSO
The capacity configuration results are shown in Table 2 and Figure 9. QPSO found the optimal result after 47 iterations, whereas PSO took 73 iterations.Using traditional PSO the battery capacities were 9084.26kWh.The ultracapacitor capacities were 2196.52 kWh.The daily cost was $6708.83,which is higher than these of QPSO.QPSO have a faster convergence rate and a better fitness value than traditional PSO.The cost of the HESS was reduced using QPSO.

Simulation of a Microgrid
To verify the effectiveness of the HESS optimal capacity configuration method from the perspective of control, the simulation model has been built in MATLAB/Simulink shown in Figure 10.

Comparison of Traditional PSO and QPSO
The capacity configuration results are shown in Table 2 and Figure 9. QPSO found the optimal result after 47 iterations, whereas PSO took 73 iterations.Using traditional PSO the battery capacities were 9084.26kWh.The ultracapacitor capacities were 2196.52 kWh.The daily cost was $6708.83,which is higher than these of QPSO.QPSO have a faster convergence rate and a better fitness value than traditional PSO.The cost of the HESS was reduced using QPSO. the system is implicit in the operation process in the form of penalty function, enough to satisfy the system requirements.

Comparison of Traditional PSO and QPSO
The capacity configuration results are shown in Table 2 and Figure 9. QPSO found the optimal result after 47 iterations, whereas PSO took 73 iterations.Using traditional PSO the battery capacities were 9084.26kWh.The ultracapacitor capacities were 2196.52 kWh.The daily cost was $6708.83,which is higher than these of QPSO.QPSO have a faster convergence rate and a better fitness value than traditional PSO.The cost of the HESS was reduced using QPSO.

Simulation of a Microgrid
To verify the effectiveness of the HESS optimal capacity configuration method from the perspective of control, the simulation model has been built in MATLAB/Simulink shown in Figure 10.

Simulation of a Microgrid
To verify the effectiveness of the HESS optimal capacity configuration method from the perspective of control, the simulation model has been built in MATLAB/Simulink shown in Figure 10.The simulation parameters are shown in Table 3.The valid value of rated voltage of the AC bus was 220 V, and the rated frequency was 50 Hz.The time constant of the low-pass filter was TL = 10 s.The battery output power is shown in Figure 11, and the ultracapacitor output power is shown in Figure 12.Comparing Figures 11 and 12, the batteries and ultracapacitors were charged from 0 s to 0.5 s because the outputs of the renewable energy resources were higher than the load.From 0.5 s to 2 s, the batteries were discharged and the ultracapacitors went through three stages (discharge, charge, The simulation parameters are shown in Table 3.The valid value of rated voltage of the AC bus was 220 V, and the rated frequency was 50 Hz.The time constant of the low-pass filter was T L = 10 s.The battery output power is shown in Figure 11, and the ultracapacitor output power is shown in Figure 12.The simulation parameters are shown in Table 3.The valid value of rated voltage of the AC bus was 220 V, and the rated frequency was 50 Hz.The time constant of the low-pass filter was TL = 10 s.The battery output power is shown in Figure 11, and the ultracapacitor output power is shown in Figure 12.Comparing Figures 11 and 12, the batteries and ultracapacitors were charged from 0 s to 0.5 s because the outputs of the renewable energy resources were higher than the load.From 0.5 s to 2 s, the batteries were discharged and the ultracapacitors went through three stages (discharge, charge, The simulation parameters are shown in Table 3.The valid value of rated voltage of the AC bus was 220 V, and the rated frequency was 50 Hz.The time constant of the low-pass filter was TL = 10 s.The battery output power is shown in Figure 11, and the ultracapacitor output power is shown in Figure 12.Comparing Figures 11 and 12, the batteries and ultracapacitors were charged from 0 s to 0.5 s because the outputs of the renewable energy resources were higher than the load.From 0.5 s to 2 s, the batteries were discharged and the ultracapacitors went through three stages (discharge, charge, Comparing Figures 11 and 12, the batteries and ultracapacitors were charged from 0 s to 0.5 s because the outputs of the renewable energy resources were higher than the load.From 0.5 s to 2 s, the batteries were discharged and the ultracapacitors went through three stages (discharge, charge, discharge).Although the HESS was charged from 1 s to 1.5 s, the batteries discharged because of the existence of the ultracapacitor.The system bus RMS voltage and frequency are shown in Figure 13.
Energies 2018, 11, x FOR PEER REVIEW 12 of 14 discharge).Although the HESS was charged from 1 s to 1.5 s, the batteries discharged because of the existence of the ultracapacitor.The system bus RMS voltage and frequency are shown in Figure 13. Figure 13 shows that although the microsources and load changed during the simulation, the system bus RMS voltage remained at 220 V, and the frequency was between 49.95 and 50.2 Hz.During 0-0.5 s and 1-1.5 s, the load demand was less than the outputs of the microsources, the HESS charged, and the system frequency increased.During 0.5-1s and 1.5-2s, the load demand was higher than the output, the HESS discharged, and the system frequency was slightly less than the rated frequency of 50 Hz.
Therefore, when there are large power imbalances, the ultracapacitors optimize the battery charging and discharging processes.The HESS can also better maintain the system voltages and frequencies, so that they are near the rated values and have smaller fluctuations.

Conclusions
This paper provides a QPSO method for determining the optimal configuration of the HESS for an isolated microgrid.Based on the different characteristics of ultracapacitors and batteries, an energy scheduling strategy is proposed which use low-pass filter for capacitance distribution.Configuration results for an example in north China demonstrated the following: (1) An energy scheduling strategy can make full use of the characteristics of the fast response speeds and high power densities of ultracapacitors.Frequent charging and discharging of batteries is avoided.A reasonable cooperation strategy between batteries and ultracapacitors is achieved.(2) QPSO has the advantages of good global convergence and fast convergence rate compared with traditional PSO.QPSO found the optimal solution using less iterations and reduced the daily cost of the HESS.The capacity configuration results obtained by PSO were larger than the results obtained by QPSO.(3) The simulation results indicate that the HESS keeps the microgrid system stable when there are large power imbalances.This verifies the effectiveness of the proposed HESS optimal capacity configuration method.
This paper considers the capacity of the energy storage system.The fault diagnosis and predictive control can also be added.However, the battery's online detection technology is very mature now.For example, the method of detecting the internal resistance of a battery can monitored online.For an ultracapacitor, with the increase of using time, the change of temperature and aging, an ultracapacitor's occurrence of fault can be divided into the following three categories: (1) loss of capacitance (more than 20%); (2) effect of over pressure; and (3) the open circuit failure [19].The use of ultracapacitors can be determined by detecting the changes in current and voltage in the charging and discharging process.In future work, system optimization and fault diagnosis can be combined to make the system more efficient and stable.Figure 13 shows that although the microsources and load changed during the simulation, the system bus RMS voltage remained at 220 V, and the frequency was between 49.95 and 50.2 Hz.During 0-0.5 s and 1-1.5 s, the load demand was less than the outputs of the microsources, the HESS charged, and the system frequency increased.During 0.5-1s and 1.5-2s, the load demand was higher than the output, the HESS discharged, and the system frequency was slightly less than the rated frequency of 50 Hz.
Therefore, when there are large power imbalances, the ultracapacitors optimize the battery charging and discharging processes.The HESS can also better maintain the system voltages and frequencies, so that they are near the rated values and have smaller fluctuations.

Conclusions
This paper provides a QPSO method for determining the optimal configuration of the HESS for an isolated microgrid.Based on the different characteristics of ultracapacitors and batteries, an energy scheduling strategy is proposed which use low-pass filter for capacitance distribution.Configuration results for an example in north China demonstrated the following: (1) An energy scheduling strategy can make full use of the characteristics of the fast response speeds and high power densities of ultracapacitors.Frequent charging and discharging of batteries is avoided.A reasonable cooperation strategy between batteries and ultracapacitors is achieved.(2) QPSO has the advantages of good global convergence and fast convergence rate compared with traditional PSO.QPSO found the optimal solution using less iterations and reduced the daily cost of the HESS.The capacity configuration results obtained by PSO were larger than the results obtained by QPSO.(3) The simulation results indicate that the HESS keeps the microgrid system stable when there are large power imbalances.This verifies the effectiveness of the proposed HESS optimal capacity configuration method.
This paper considers the capacity of the energy storage system.The fault diagnosis and predictive control can also be added.However, the battery's online detection technology is very mature now.For example, the method of detecting the internal resistance of a battery can monitored online.For an ultracapacitor, with the increase of using time, the change of temperature and aging, an ultracapacitor's occurrence of fault can be divided into the following three categories: (1) loss of capacitance (more than 20%); (2) effect of over pressure; and (3) the open circuit failure [19].The use of ultracapacitors can be determined by detecting the changes in current and voltage in the charging and discharging process.In future work, system optimization and fault diagnosis can be combined to make the system more efficient and stable.

Figure 2 .
Figure 2. Power revision processes for batteries and ultracapacitors.

Figure 2 .
Figure 2. Power revision processes for batteries and ultracapacitors.

Figure 4 .
Figure 4. Ideal power value of the hybrid energy storage systems (HESS), P * HESS .

Figure 7
Figure 7. P * HESS and actual HESS power for sample points 1-48.

Figure 7
Figure 7. P * HESS and actual HESS power for sample points 1-48.

Figure 6 .
Figure 6.Charging and discharging power of the HESS.

Figure 7
Figure 7. P * HESS and actual HESS power for sample points 1-48.

Figure 9 .
Figure 9.Comparison of optimization using two methods.
t + P wt,t + P bat,t + P sc,t + S lack,t P lack,t = P load,t + S waste,t P waste,t

Table 1 .
Wind, photovoltaicunit (PV) output and load curve for an isolated microgrid.Parameters of the battery and ultracapacitor.

Table 1 .
Parameters of the battery and ultracapacitor.

Table 1 .
Parameters of the battery and ultracapacitor.

Table 2 .
Comparison of optimal configuration results using quantum-behaved particle swarm optimization (QPSO) and traditional particle swarm optimization (PSO).

Table 2 .
Comparison of optimal configuration results using quantum-behaved particle swarm optimization (QPSO) and traditional particle swarm optimization (PSO).

Table 2 .
Comparison of optimal configuration results using quantum-behaved particle swarm optimization (QPSO) and traditional particle swarm optimization (PSO).