###### Abstract  
This paper proposes a hierarchical control strategy to coordinate battery energy storage devices based on a multi-agent system. The heterogeneous nature of the battery volume is paid much more attention in designing the proportional protocol of the consensus controller. Besides that, a cluster algorithm based on Minimum Spanning Tree (MST) is suggested to represent geographical factor, and on account of that, each Battery Energy Storage System (BESS) is classified into its specific cluster zone. Further, an active leader is assigned to be in charge of information from the external side in every cluster. The consensus algorithm reconciles all clusters in a step-by-step way. Energy level, voltage, frequency and active/reactive power sharing of every BESS can reach consensus by an information exchange within and among clusters respectively. Further, a virtual leader is taken into the active leader role in directing frequency and voltage to the reference values. To verify the consensus algorithm, a modified IEEE 57-bus is employed for time-domain simulations in an islanded mode and all BESSs are working in a discharge model. B 20202019 January 202020 January 202020 January 2020 January 202020 January 2020 January 202020 January 202020 January 20  
average consensus. In [14], a consensus algorithm based on a multi-agent system is proposed to solve the energy management problem. In a single energy storage system, P/Q control and U/f control are the common methods, and the former carries out in a grid-connection mode while the latter puts into effect to retain the stability of voltage and frequency in island mode [15]. However, in the smart grid with multi storage systems, droop control is adopted to support load reliably [16; 17] and propose a sparse communication network-based droop control to achieve power sharing, which can overcome the influence of output line impedances. Moreover, since microgrid does not have the characteristics of anti-interference capability, a PWM power converter of energy storage with droop control can operate in double quadrants, which can improve the inertia and damping of the grid. Thus, droop control can improve the capacity of resisting disturbance [18; 19]. Challenges brings about power supply instability in the process of distributed generation integration into a power system, such as a voltage flicker [20]. Based on the above analysis, many researches focus on the performance of the storage incorporated into microgrid. [21] proposes the non-uniform droop gain ratio scheme to attain more accurate power sharing and restrain voltage and frequency fluctuation in the wind farm combined with the energy storage system. In [22], a flywheel merged into a wind farm can operate in an island model and support load to synchronize the system under the framework of a distributed algorithm. [23; 24] proposed a distributed cooperative system and a secondary frequency controller for energy storages, whose power and energy level can reach a balance among the storages while the frequency can restore to the nominal value. In [25], the concept of heterogeneous nature of battery volume representing the capacity of power generation is drawn into a distributed controller to reach the power sharing consensus. Hierarchical control is applied to stabilize the frequency and voltage and restore the frequency and voltage to the nominal values by the secondary controller designed in [26]. Similarly, [27] designed a secondary voltage controller with feedback linearization to regulate the voltage of the distributed generation to the set values. In fact, a large-scale power system is a common form in a large region, where the power generations can be distributed in a certain distance from each other. However, in all of the above existing studies, the location feature has not been considered.