## 1 Introduction
In order to solve the shortcomings of traditional regulation methods, researchers have proposed many solutions using battery energy storage systems (BESSs) to adjust voltage and frequency recently. The BESSs with fast dynamic response characteristic can maintain power balance in the grid. The voltage and frequency deviation of the grid can be alleviated by the charging and discharging of BESSs [18]. Installing a BESS in a suitable place, utilizing battery charging and discharging to solve the voltage/frequency deviation is becoming a trend of future power system development [19; 20; 21; 22]. Several studies have been conducted recently on the voltage and frequency regulation by using BESS. Reference [23] analyses the effect of BESS on the short-term frequency control in autonomous microgrids. Load factor has been improved by BESSs in References [24; 25]. Reference [26] configures capacity of the BESS according to the renewable energy production rate and proposes a control strategy to track the power reference. According to the researches of [27; 28], BESS applications can stabilize renewable energy output. Predictably, BESS will be more commonly employed in the distribution system because of its advantages. When the number of BESSs is getting larger in the distribution system, the charging and discharging of BESSs should be properly controlled because different locations of BESSs have different effects on the grid. [PERSON] et al. propose a coordinated control algorithm for distributed BESSs [29]. In [PERSON]'s algorithm, the main control center sends charging or discharging commands to BESSs when the voltage or frequency deviation exceeds the normal range. When the state of charge (SOC) of the selected BESS reached the upper or lower limits, then the algorithm selected another BESS to operate. Voltage regulation and frequency regulation are performed independently in this algorithm, simultaneous voltage and frequency regulation are not considered in [PERSON]'s algorithm. Moreover, the control of SOC needs further exploration. Therefore, we propose a novel control algorithm for coordinated control of BESSs, which enable power systems to deal with emergencies and combines voltage regulation and frequency regulation in one process by using the operating reserve. Through the coordinated charging and discharging of multiple BESSs, the grid voltage and frequency are controlled within the permissible range, and the adverse effects caused by deviation are alleviated. BESSs' adjusting speed is outstanding, it can reach the required power within the time set by the Union for the Coordination of Transmission of Electricityin Europe (30s) [30]. The number of charging and discharging cycles of BESSs is minimized to save the life time. The contributions of this study are as follows:  
1. The proposed coordinated control algorithm firstly calculates the required power for voltage and frequency deviation control, respectively, and then compares the two values and obtains an optimal regulating power for simultaneously solving the voltage and frequency deviation, which reduces the number of BESSs charging and discharging cycles, and improves the life time of the batteries. 2. The proposed method is compared with [PERSON]'s algorithm [29] through the case studies. In [PERSON]'s algorithm, the voltage and frequency regulation by BESSs are operated in a sequential order, which operates the BESSs more frequently. The results of the case study illustrate that a smaller number of charging/discharging cycles and better SOC control can be achieved by our proposed algorithm. The remainder of this paper is organized as follows. Section 2 describes the proposed system architecture. Section 3 presents the problem formulation and solution algorithm. The simulation results in a 33-node distribution system is provided in Section 4. Section 5 presents the conclusion of this study.