Optimal sizing and operating strategies for VSG based BESS in ancillary service market

In response to growing power demand and rising environmental awareness, renewable energy (RE) resources are becoming increasingly common. However, the power output of RE is intermittent, as it strongly depends on the weather conditions; this increases the difficulties for the system operator (SO) to maintain the system frequency. This paper proposes an optimal sizing and operating strategy for a battery energy storage system (BESS) which integrates with virtual synchronous generator (VSG) technologies to participate in ancillary service (AS) market. The proposed method improves the traditional dual-stage architecture of BESS capacity planning problem to speed-up computation. However, the dimension and complexity of the optimization problem would increase accordingly. Therefore, the Electron Drifting Algorithm (eDA) is proposed to solve the proposed optimization problem and improve the quality of solution. To verify the feasibility, the IEEE 30-bus test system is employed for dynamic analysis by using the dynamic power system simulation software DIgSILENT PowerFactory. This paper provides a new business model to promote investments in BESS, not only yielding economic benefits, but also effectively increasing the robustness of the grid and further accommodating additional RE.


Introduction
With the growth of the population and industrial activities, the reliance on fossil fuels has dramatically increased. Moreover, due to higher greenhouse gas emissions caused by burning fossil fuels, there are increasingly severe environmental problems such as pollution, global warming, and climate change, etc. In order to relieve these problems, inverter-based distributed generators (IBDG) powered by renewable energies (RE) have been developed and readily applied in recent decades.
However, with the increasing penetration of RE systems, generation is shifting from centralized power stations with large synchronous generators (SG) having large rotational inertia due to their rotating parts to distributed generation involving smaller power sources with either very small or no rotating mass and damping properties. This will have an enormous influence on the dynamic response and stability of power systems [1][2][3]. For this reason, the control of the switching pattern of an IBDG has been studied in order to emulate the rotating mass and damping property behavior of a real SG. The concept is known as virtual synchronous generator (VSG) [4][5][6][7][8].
The high RE penetration will cause some problems for power grids, such as line overloading, overvoltage, and frequency fluctuation. Frequency fluctuation is one of the most likely problems to occur with high RE penetration. When the output power of RE largely fluctuates, the automatic generation control (AGC) of existing synchronous generators may be insufficient. Therefore, a faster additional response capacity used to perform frequency regulation should be included. Battery energy storage system (BESS) is an appropriate tool for regulation of the grid frequency: it not only reacts quickly but also flexibly. However, the initial capital and maintenance cost of BESS are still high 9 and hamper their development. Therefore, both a realistic method to determine the optimal installed capacity and a suitable business model are needed.
Recently, a virtual synchronous generator (VSG) [10 ]control strategy for distributed generation inverters is discussed. According to the rotor motion equations, namely, swing equations, virtual inertia control is introduced into the control algorithm of the inverters, including governor and exciter to emulate the characteristics of the rotor. By using this control, the network frequency response resulting from load changes can be effectively improved.
In literature [11], a novel VSG controller is proposed, which uses virtual inertia for inverters to improve the frequency response of microgrid under disturbances involving large frequency deviations. In [12] and [13], an algorithm for self-tuning (ST) inertia of VSG is introduced. Moreover, the performances of the ST-VSG and the constant-parameter (CP) VSG are evaluated by comparing their inertial response and damping power under different scenarios of load variations.
In summary, all the existing researches on VSG mentioned above explored only the control method at the power electronics level. The profitable applications and business model of VSG are less to be discussed. BESS are commonly integrated with RE such as PV or wind turbine to stabilize the system, or participate in energy market to get profits [14][15][16][17]. Besides, it's also a suitable source for being the input-side of VSG. However, because of the high capital cost of BESS, the optimal installed capacity of BESS has become a widely studied topic.
The optimal capacity of BESS is highly dependent on how it operates. Thus, the dual-loop optimization structure, namely the capacity optimization loop and charging/discharging optimization, is commonly employed [18][19][20][21] to find the solution. In [18], batteries and super-capacitors are used to ensure the continuity and reliability of electricity because of the unstable and unpredictable output power of RE. The optimal capacity is determined by using a hybrid algorithm, simulated annealing particle swarm optimization (SAPSO) in dualloop optimization. However, fixed values of the lifetime of batteries and super-capacitors are not realistic.
In [19], an optimal method is proposed to optimize the capacity of BESS. Also, the capacity of BESS is divided into two parts to deal with reliability and loadprofile smoothing issues, respectively. Literature [20] focuses on finding the optimal size of power and energy ratings for a Vanadium Redox Battery (VRB) system to perform energy arbitrage. The dual-loop optimization is performed and solved by dynamic programming (DP) where the outer loop is for planning and the inner loop is for operation.
As mentioned above, in the optimal BESS sizing problem, the general dual-loop optimization structure is widely used [18][19][20][21] separating the process into planning loop and operation loop. These two optimization problems are decoupled to determine hierarchically the optimal capacity and operation of BESS. However, it usually takes a lot of computation time, especially for some applications that require power flow analysis to check constraints. This paper proposes an optimal sizing and operation strategy for a BESS participating in the ancillary service (AS) market, not only considering the time-of-use (TOU) tariff to perform energy arbitrage, but also integrating VSG to provide instant frequency regulation service. Besides, the common and widely used dual-loop optimization structure is replaced by using a proposed single-loop optimization structure to decrease the computation time. Although, the dimension of the optimization problem is correspondingly increased, the electron drifting algorithm (eDA) [22,23] is employed to improve the solution because of its better searching ability. This paper proposes a new application of BESS, not only providing incentives for investors, but also increasing the robustness of the grid to accommodate more RE systems.

System Architecture
The recent development and advancement of RE strongly increase their market penetration, resulting in a reduction of their cost and subsidies [24]. However, the power generation from RE is subject to large uncertainty, thus causing many problems such as frequency fluctuations, overvoltage, and reverse power flow. In order to ensure the power-supply reliability, the system operator (SO) usually establishes an AS market for stabilizing the power system. Through the interactions between the SO and AS providers in the AS market, not only can the AS providers earn profits, but the system can also become more stable.
The overall system architecture is illustrated in Fig. 1. In general, the electricity market can be divided into the energy market and the AS market, where the energy market is concerned with the general power transactions and the AS market is employed to prepare the other resources which the system operation needs.
For the market operation, smart measurement devices acquire the relating information and send it to the SO through the supervisory control and data acquisition (SCADA) system for power flow analysis and data forecasting. According to the forecasting results and transaction mechanisms, the SO will announce energy price and ancillary service price (ASP) for system participants to achieve the minimum operating costs and meet the system reliability requirements.
To mitigate the frequency fluctuations caused by high penetration of RE, the power capacity which has fast response ability is essential to maintain the real-time power balance of supply and demand. Normally, power generation companies (GenCo.) are the main providers of the dispatchable capacities, namely AGC. In this paper, BESS is adopted to participate in the electricity market including the both energy and capacity market. The proposed optimization method can determine the optimal installed capacity of BESS and the best operation based on the relevant market prices. The schematic diagram of capacity allocation of the comparison of conventional generators and BESS is shown in Fig. 2.

A. The Overall Optimization Process
The overall single-stage optimization process is illustrated in Fig. 3. In general, the historical data are employed to estimate the optimal capacity of BESS. However, it needs lengthy computation if there are massive historical data. In order to balance the computation time and reality of the system, it is necessary to select representative typical days from a large database of historical data, as performed in this paper.
After obtaining historical data series of load, PV, and price profiles by K-means clustering, the related data of the typical days are input into the simulation models for analyzing the dynamic responses and obtaining the required regulation power to stabilize the system frequency within the prescribed range. The VSG dynamic simulation model [10] is implemented by the DIgSILENT PowerFactory software. The proposed optimization method is then executed to find the optimal installed capacity, the charging/discharging power, and the AS capacity of BESS. The net profit acquired from the scheduled operations is settled according to the real-time pricing of the energy market. In addition, the remaining capacity of BESS is used to participate in AS market.

B. Optimization Structure Comparison
Generally, the BESS capacity and operation optimization are divided into the two decoupled problems. The typical dual-loop optimization structure [18][19][20][21] is commonly used for BESS installation planning, as shown in Fig. 4. In the dual-stage optimization structure, the decision variables are the BESS capacities in kW and kWh which are applied into the inner loop as constant parameters to optimally schedule the charging/discharging power.
The decision variables of the outer and inner loops can be represented in (1) and (2), respectively. Assuming there are K BESS and T time slots, the dimensions of outer and inner loops are 2×K and T×K, respectively. Furthermore, assuming there are S solutions in each iteration and G iterations, the objective function must be calculated (S×G) 2 times in the dual-stage optimization structure. where P rate (k) and E rate (k) are the capacity of the k th BESS in kW and kWh and P B,sched (k, t) is scheduled power output of the k th BESS in the t th time slot. The proposed single-loop optimization method, which directly integrates the two sets of decision variables expressed as (1) and (2) into a single optimization problem, is shown in Fig. 3. Its computation time can be greatly decreased due to reduction of the calculating times of objective function to be S×G. Besides, the repeated computations in the dual-loop structure can also be avoided.
However, the problem dimension of the single-loop structure is accordingly increased to (2+T)×K, which obviously complicates the problem. Thus, an advanced algorithm that is more suitable for the optimization problems high dimension is needed. In this paper, the eDA [22,23] is adopted to solve the proposed optimization problem.

C. Formulation of Optimal BESS Installation -Objective Function
As mentioned above, the BESS installed capacities in kW and kWh and scheduled charging/discharging operations are the decision variables of the proposed optimization problem. The optimal installed capacities are mainly determined according to the net profit of the BESS owner, which can be calculated by its revenues, the capital cost, and the operating and maintenance (O&M) cost of the BESS. The objective function of the proposed method is shown in (3) to (5). In the proposed method, the remaining capacity of BESS inverter except the scheduled power output, as calculated by (6), is adopted to participate in the AS market in the form of VSG. Therefore, the practical power output, P B,prac , can be calculated by (7).

-Equivalent Mathematical Model of Battery
The analysis described in 25 demonstrated that the Zinc-Bromine (Zn/Br) Flow Battery has better cost/benefit rate. Therefore, in this paper, the Zn/Br battery integrated with VSG is selected to maximize the net profit of BESS owner and participate in AS market to regulate the frequency and voltage. The basic BESS physical model is defined as (8) and (9), including stateof-charge (SOC) and storied energy, respectively.
To evaluate the degradation cost of BESS, the depth of discharge (DOD) of every discharge should be taken into account. The equivalent life-cycle can be estimated through the coulomb/ampere-hour counting method 26, which means that the available charge/discharge cycles throughout the lifetime of a battery can be transformed into an amount of coulomb. Once the cumulative coulomb from charging and discharging reaches the transferred coulomb rating, i.e. the total coulomb amount throughout the battery lifetime C T , the battery must be replaced.
The total coulomb amount C T and the cumulative charging and yearly discharging coulomb C y are formulated as (10) and (11), respectively. The practical replacement year of the battery can be then calculated by (12). Equation (13) limits the power output of battery for power supply security. To avoid the battery rapidly aging, the SOC should be maintained between the upper and lower bounds, illustrated as (14).

A. Test System and Parameters
The IEEE 30-bus system, as shown in Fig. 5, with 33 kV voltage level and 300 MW peak load is employed for verification. A 500 MVA synchronous generator with traditional droop-control and totally 135 MWp solar PV systems are assumed to connect to the test system. The practical yearly load, real-time energy pricing, and AS pricing data adopted from PJM in 2016 27 are used in the simulations.
The proposed optimization method is implemented by using MATLAB R2017a. Besides, the dynamic

B. Results of BESS Capacity Optimization
In order to validate the proposed method and its benefits, the two cases without and with considering AS market are compared. TABLE II shows the optimization results which indicate that the BESS system is not recommended in Case 1 due to the high cost of BESS and insignificant price-difference during peak and offpeak load periods.
On the contrary, in Case with the BESS participating in the AS market, the BESS investor can then earn the profits owing to operations for energy as well as AS arbitrage. According to the results, the investor is recommended to install a 12.51MW/16.84MWh BESS in the test system. The annual profit thus earned is $91,206 as revealed in the simulations, a profit which provides positive incentives for the investor. Although the profit seems not that significant, it may become higher and higher in the future due to the decreasing trend of the BESS cost.   Fig. 6 depicts the comparison of frequency profile with and without the proposed BESS-VSG integration system on the typical days considered. The corresponding practical power output including scheduled power and compensated power of VSG is shown in Fig. 7. It can be observed that the frequency fluctuation is improved by the larger virtual inertia provided from BESS. Besides, the maximal rate-ofchange of frequency (ROCOF) as defined in (15) is decreased from 0.4907 to 0.2974.

C. Compairsions of Optimization Algorithms
As in the description above, the proposed single-loop optimization method can greatly reduce the computation time of the dual-loop structure which has been commonly used in capacity optimization problem. However, the optimization algorithm with better searching ability is thus essential to deal with the complicated single-loop problem dimension.

Fig. 6
Frequency with/ without the proposed BESS and VSG integration system on the typical days considered.

Fig. 7
The BESS power output of the typical days. The proposed eDA has been verified to be more suitable for some high-dimension problems and has better global searching ability 22, 23. In this paper, the eDA is applied to solve the proposed method and compared with two common optimization algorithms, particle swarm optimization (PSO) and differential evolution (DE), to validate its performance. Fig. 8 shows the convergence curves of the three compared algorithms. The same 50 particles and 1,000 iterations are set to fairly compare their performance. Based on the results, the yearly profit of BESS calculated by eDA is about 6% better than other algorithms.

D. Comparison of Optimization Structure
To verify the performance of the proposed singlestage optimization structure and increase comparison fairness, the calculation times of objective value is set as 50,000 in both structures. For the proposed single-stage optimization, 50 particles and 1,000 iterations are given. On the other hand, the parameters of outer loop and inner loop are set as (10 particles, and 10 iterations) and (20 particles and 25 iterations), respectively.
The simulation results and converging curves of the two structures are shown in TABLE III and Fig. 9. Although the proposed method may complicate the original problem dimension, the repeated computation of the inner loop for the operation problem can be greatly reduced. Based on the computation results, the profit optimized by using the proposed single-loop method is increased by approximately 47% as compared with the dual-stage structure. Besides, according to the converging curves, if the dual-stage structure may reach the same convergence value, the needed iteration number would be very large, which should take a lengthy computation time.

Fig. 8
Convergence curves of the compared algorithms.

Fig. 9
The converging curves of the two optimization structures.

Conclusions
Integrated with the application of VSG technology, the BESS sizing and scheduling optimization method has been proposed. In the method, the BESS has been employed to participate in not only the energy market but also in the AS market to increase their profits. The IEEE 30-bus system is adopted to validate the feasibility of the proposed method.
In order to improve the computation efficiency, the single-stage optimization structure is proposed to replace the common dual-stage optimization structure. The computation results have indicated that the proposed method can raise the profit by more over 45% in the same iteration number. Although the dimension and complexity of the optimization problem are increased accordingly, the proposed eDA is used for enhancing the searching ability. Compared with the PSO and DE optimization algorithms, the eDA can effectively improve the profit by 6%.
This paper provides a business model for the BESS investors to have positive incentive which is expected to be further improved as its capital cost goes lower in the future. The promotion of BESS can yield economic benefits and also effectively increase the robustness of the grid. The hosting capacity of RE can be enhanced accordingly as well.