Open access peer-reviewed chapter

Consensus Control of Distributed Battery Energy Storage Devices in Smart Grids

By Javad Khazaei and Dinh Hoa Nguyen

Submitted: June 19th 2019Reviewed: July 16th 2020Published: February 17th 2021

DOI: 10.5772/intechopen.93409

Downloaded: 33


One of the major challenges of existing highly distributed smart grid system is the centralized supervisory control and data acquisition (SCADA) system, which suffers from single point of failure. This chapter introduces a novel distributed control algorithm for distributed energy storage devices in smart grids that can communicate with the neighboring storage units and share information in order to achieve a global objective. These global objectives include voltage regulation, frequency restoration, and active/reactive power sharing (demand response). Consensus theory is used to develop controllers for multiple energy storage devices in a cyber-physical environment, where the cyber layer includes the communication system between the storage devices and the physical layer includes the actual control and closed-loop system. Detailed proof of designs is introduced to ensure the stability and convergence of the proposed designs. Finally, the designed algorithms are validated using time-domain simulations in IEEE 14-bus system using MATLAB software.


  • consensus control
  • battery energy storage
  • smart grids
  • distributed control
  • droop control

1. Introduction

Integration of highly distributed renewable energy sources has introduced significant challenges to the resiliency and efficiency of the smart grid systems. This is mainly due to uncertain behaviors of these renewable energy sources and their dependency to weather conditions [1, 2]. Battery energy storage has been introduced as a solution to solve the intermittency and uncertain behaviors of renewable energy sources in smart grids. The energy storage is normally connected to the electric power system through a voltage source converter and by controlling the charge/discharge rate of the storage units, output power regulation of renewable energy sources can be achieved [3, 4].

Currently, energy storage units are distributed throughout the grid. Given the centralized structure of supervisory control and data acquisition (SCADA) system, it cannot meet the requirements of highly distributed renewable energy and storage devices of future smart grid systems. In addition, the centralized controllers suffer from single point of failure and are not a suitable choice for energy storage control when the grid resiliency is significantly important [5, 6, 7]. As an example, an energy storage device which is permanently out of energy is not able to use its power capability to support the load until a charge event is scheduled. Moreover, any charge discrepancies will result in battery degradation due to the increased depth of discharge.

Distributed control of distributed energy storage units has recently been introduced [8, 9, 10, 11]. For example, a coordinated control is proposed for low voltage distribution networks in [8], which mitigates voltage fluctuations in a distribution feeder using distributed storage units. As another example, the voltage regulation issue of distribution feeders is resolved using a droop-based distributed controller to cooperatively charge/discharge the storage units to regulate the feeder voltage considering the state of charge of the batteries [9]. In Hammad et al. [10], a virtual inertia-based distributed controller is designed for transient stability of a power system using distributed storage units. The authors then used a feedback linearization control algorithm to evaluate the proposed virtual inertia and its effectiveness in stability of the system.

Consensus control of energy storage units has also recently been proposed as an emerging technique for synchronization of distributed storage devices [12, 13, 14, 15, 16, 17, 18, 19, 20]. In Khazaei and Miao [13], the authors introduced a state of charge balancing algorithm for distributed storage devices in AC microgrids using consensus theory and validated the results using a real-time simulator. In Guan et al. [15], a dynamic consensus approach was introduced to balance the discharge rate of energy storage devices in AC microgrids. The proposed model achieved power regulation by adjusting the virtual resistance of voltage-controlled inverters. A novel distributed controller was designed for load management in distribution networks using distributed battery storage systems. The proposed methodology used limited communications to coordinate multiple storage units with solar power energy penetration. The authors also have significantly studied the consensus design for storage devices for power sharing and energy synchronization [13], power sharing of heterogeneous storage units with droop control [14], voltage and frequency regulation of storage devices in smart grids [16], output power regulation of double-fed induction generator-based wind farms [19], and power sharing of storage devices with different droop schemes [20].

This chapter summarizes the findings of the authors in the distributed control design of energy storage devices in smart grids to provide ancillary services including: (1) voltage regulation, (2) primary frequency support, (3) equal active power sharing between storage units based on their capacities, (4) equal reactive power sharing based on storage capacity, and finally, and (5) controlling the load in both islanded and grid-connected modes. Time-domain simulations on a modified IEEE 14-bus system are performed to validate the effectiveness of the proposed designs.

The rest of the paper is as follows: Section 2 covers the battery energy storage model. Consensus design for heterogeneous storage units is considered in Section 3. Section 4 includes multiple case studies to validate the designs, and Section 5 concludes the chapter.

2. Battery energy storage model

A basic schematic of an energy storage device, which is connected to the grid through a DC/AC converter and an LCL filter is illustrated in Figure 1. The energy storage control uses the well-known synchronous reference frame control, where three cascaded control loops are adopted. The main objective is to control the active and reactive demand using a droop control method in dqreference frame. The droop control receives active and reactive power measurements from a sensor installed at the point of common coupling (PCC) as

Figure 1.

Control structure of a battery energy storage system.


where Pmiand Qmiare measured active and reactive powers, respectively. In addition, vod,voq,iod,and ioqare measured converter voltages and currents at the point of common coupling, as illustrated in Figure 1. The measurements will then pass through a low-pass filter,


where αpand αqare the bandwidths of the low-pass filters. The AC-side dynamics of the ithenergy storage system in dqframe is expressed as:


where vodand voqare dqvoltages at the point of common coupling (PCC), vidand viqare the dqframe converter output voltages, and iidand iiqare the dqreference frame currents flowing from the PCC to the converter.

2.1 Inner current controller

The most inner control loop in the energy storage system is the current controller, which is in charge of regulating the converter current in a decoupled manner. The inputs to this controller come from the voltage controller and are the reference dqframe current setpoints. Two proportional integral controllers are utilized which regulate the dand qaxis currents with feedforwarded loops. Dynamics of the current controller for ith battery storage system are presented as [14]:


where vidrefand viqrefare reference converter voltages to be sent to the pulse width modulation (PWM) controller, kpand kiare the PI regulator gains, and τis the time constant of the low-pass filter for voltage measurement. The controller computational delay and pulse width modulation (PWM) switching are modeled by τswhich can be ignored for simplicity [14].

2.2 Voltage control

Voltage controller receives inputs from the droop controller and provides reference currents for the inner current control loops. Similar to the current controller, two PI regulator are used for the voltage controller. Dynamics of the voltage control loop can be modeled by [14]:


where vodref,voqrefare dqframe reference converter voltages, vod,voqare the dqframe measured voltages at the PCC passed through a low-pass filter, and iod, ioqare the dqframe converter output currents. In addition, τvis the time constant of the filter that is used in voltage controller.

2.3 Droop control

Droop control is used when multiple converters are installed in parallel to support the load based on their capacities. The principle of the droop control is based on the fact that a converter with higher capacity should share more load compared to a converter with lower capacity. This will be taken care of by designing droop gains properly. The droop controller receives measurements from active and reactive powers at the point of common coupling and provides reference voltage and frequency to that shape the reference voltages in dqframe for the voltage controller loop such that


The droop controller sends the reference voltage magnitude and frequency setpoints of the converter to the voltage controller. Dynamics of the droop controller can be expressed by:


where ωiis frequency setpoint of ithbattery storage, ωinomis the nominal frequency to be developed using the consensus theory, DiPis the active power droop gain, Vinomis the nominal voltage magnitude of the ithstorage to be designed by consensus control, and DiQis the reactive power droop gain. The droop gains can be found by:


The droop control design is similar to the primary frequency and voltage control of synchronous generators, where the voltage and frequency will not be regulated to their nominal values. To restore the voltage and frequency to their nominal values, a distributed controller is designed in this work using a consensus theory. The proposed controller receives signals from neighboring storage devices and modifies the nominal frequency/voltage in the droop equations to regulate the voltage and frequency to their setpoints.

3. Heterogeneous consensus design

The main objective of this section is to supplement a secondary controller to the droop controller of the storage devices. The controller receives information from neighboring storage units and shares the power between storage devices to regulate the voltage and frequency of the system at the point of common coupling. Furthermore, a virtual leader is considered, which can be assigned to one energy storage in the system, or a few storage devices. The leader will have the setpoints of the voltage and frequency in the system and will share the information with its neighboring storage units. To develop such a control design, the battery energy storage model needs to be developed. In our recent work, a simplified battery energy storage model was developed. The model accounts for the dynamics of the droop controller and active power/energy relationship of the battery. Such model can accurately incorporate the dynamics of energy storage devices in smart grids. Dynamics of the energy storage devices can be represented by [14]:


To develop such simplified model, it is assumed that dynamics of voltage controller and current controller are much faster than the droop controller, therefore, their dynamics can be ignored. In the above model, uiPis the input for distributed active power sharing, and DiPreflects the heterogeneity of batteries. To achieve equal power sharing, DiPPishould be regulated among batteries so that a battery with higher capacity (lower droop gain, DiP) contributes more to the power sharing. To minimize the number of communication links between the storage devices, this paper regulates the nominal voltage and frequency of neighboring storage units. In this method, there will be no need to receive measured voltage and frequency signals from neighboring storage units and the control design only requires the nominal frequencies ωjnomand nominal voltages Vjnomof its neighboring storage devices.

To provide voltage and frequency regulation as well as active/reactive power sharing, new distributed inputs can be designed using consensus theories. These inputs include V̇inom=uiV, Q̇i=uiQ, and ω̇inom=uiω. The overall dynamics of the ithenergy storage device is then formulated as [14]:


In the next section, control design to develop these new inputs will be elaborated in detail.

3.1 Graph theory

Some preliminary information on graph theory is needed in order to design the controllers. The multi-agent system theory is considered for designing the controller inputs so that each battery energy storage unit is considered as an agent that can communicate with neighboring agents. It is also assumed that the communication network of the system is an undirected graph Gthat has a vertex set of Vand an edge set of E. Each vertex represents an energy storage system and the interconnection between storage systems kand jis represented by element kjE.

The neighboring set of energy storage number kis expressed by NkjV:kjE. In addition, akjis an element of the adjacency matrix Aof G, i.e. akj=1if kjEand akj=0if kjE. Finally, Dis the degree matrix that is derived by D=diagdkk=1,,n, where dkjNkakj. It is noted that, the Laplacian matrix Lassociated to Gcan be formulated by L=DA. The leader is in charge of sending setpoints to energy storage units. The leader is represented by sub-index 0and its neighboring storage units are denoted by N0. Then a0i=1if iN0, while a0i=0if iN0.

3.2 Consensus control design

Let ωrefand Vrefbe the reference frequency and voltage magnitude of energy storage devices. These references serve as external commands to force the frequency and voltage magnitude of storage devices to converge precisely to the expected values. In other words, they are virtual leaders while the frequency and voltage magnitude of batteries are the followers. In this sense, the consensus design is proposed as follows,


Note here that the controller gains for the active power and frequency are the same, and similarly the controller gains for the reactive power and voltage magnitude are also the same. The structure of the proposed distributed primary and secondary voltage/frequency controller is illustrated in Figure 2.

Figure 2.

Structure of the proposed distributed controller.

3.3 Consensus proof

Let P˜iDiPPiand Q˜iDiQQi, then the closed-loop model of BESS with the consensus design (18) is


First, we introduce the proof for consensus of the active powers and reactive powers of storage devices. It can be easily observed from Eq. (19) that the dynamics of the proportional active powers P˜iand reactive powers Q˜ihave the same form. Moreover, the consensus of the proportional active powers P˜iwill lead to the consensus of batteries’ energy levels Ei, if the initial state of charge of the batteries is the same. Therefore, we only present the proof for the consensus of the active powers P˜i. The dynamics of P˜iis self-contained and in form of a first-order differential equation, and hence, its solution can be easily found to be


where P˜0is the vector of initial proportional active powers of batteries. Since Lis a symmetric matrix, eC2Ltis also a symmetric matrix. Let URN×Nbe an orthogonal matrix derived from diagonal matrix L. Subsequently, it can be easily seen that


since λ2,,λNare positive eigenvalues of Lonce Gis connected. On the other hand, Udiag100UT=1N/N0N0NUT=1N1NT/Nsince the eigenvector associated with the zero eigenvalue of Lis 1N. Therefore, we obtain from (21) and (20) that


which means that the average consensus is achieved for batteries’ proportional active powers. As mentioned above, similar proof can be utilized to get the consensus of batteries’ proportional reactive powers.

Next, we present the proof for the consensus of the voltage magnitude and frequency of batteries to their references Vrefand ωref. For brevity, only the proof for the consensus of nominal frequency ωinomis given, while the proof for the consensus of nominal voltage magnitude Vinomcan be derived similarly because their equations are in the same form as seen in (19).

Let us denote




Denote D0diaga0ii=1,,N. Consequently, we obtain from (23) that


Assume that the communication graph Gamong followers is connected and at least one follower is connected to the leader, i.e. D0is not a zero matrix, then it was shown in [20] that all eigenvalues of the matrix C2L+C0ωD0have positive real parts for any C2>0and C0ω>0. Thus, it can be immediately concluded that the system (24) is stable, i.e. limtω̂t=0. This is equivalent to the consensus of battery frequency to the reference frequency ωref. Same analysis holds for the consensus of the nominal voltage magnitude.

4. Case studies

To validate the proposed designs, IEEE 14-bus benchmark is used. The system represents an approximation of U.S. utility system around 1962. The benchmark includes five generation units and 11 loads. Parameters of the test system were adopted from [21]. The system was modified for the current study. The generator dynamics were replaced by the battery energy storage dynamics. The system was modeled in MATLAB Simulink and a combination of MatPower and MatDyn toolboxes are used for dynamic simulation of the proposed control algorithms [22]. The MatPower toolbox was used for power flow and initial conditions of the system, where MatDyn was used for dynamic simulations and control design. The authors have extensively studied integration of battery energy storage units to IEEE benchmark cases using MatDyn toolbox in their previous publications [9, 10]. The consensus controllers then are supplemented to the model as inputs. The schematic of the modified IEEE 14-bus system used for the simulations in this study is illustrated in Figure 3. Parameters of the storage units are included in the Appendix section.

Figure 3.

Modified IEEE 14-bus system with five energy storage units.

The communication structure of the system under investigation is illustrated in Figure 4. As it can be observed, the communication graph of the system is undirected and minimum number of communication links is needed to ensure the convergence of the proposed algorithms. Furthermore, the leader is incorporated in battery energy storage number 2. The leader can be designed in any storage number as one leader is sufficient to ensure the functionality of the proposed control design.

Figure 4.

Communication graph of the system.

4.1 Constant power control

In the first case, the performance of the designed voltage and frequency controller is tested when a constant load is applied to the system. The secondary controller ensures sharing the active and reactive powers between the storage units based on their capacities as well as voltage/frequency regulation. Simulation results for this case study are illustrated in Figure 5. For this case study, the leader is activated by setting C0ω=1and C0V=1. The overall load in the system (summation of loads in all busses) is SD=0.5+j0.5p.u. It can be shown that the active/reactive power sharing (first subplot) is achieved after 15 s, and the voltage and frequency are regulated to their reference setpoints (1 p.u.) after 15 s. The designed controller can synchronize the operation of storage units in the system very fast.

Figure 5.

Primary frequency response to a constant load.

4.2 Primary frequency response

In the second case, the primary active and reactive power sharing is the main objective. The batteries should share the load power equally using the primary droop concept. The leader will be deactivated in this case enforcing consensus gains C0ωand C0Vto zero. This will result in a primary voltage and frequency response, where the battery storage units will share the load active and reactive power demand, but the voltage and frequency will deviate from the nominal value. Similar to the first case study, the system starts with a 0.5+j0.5p.u. load and a load change event is scheduled to increase the demand to 1+j1p.u. after 20 s. Simulation results are illustrated in Figure 6. It is shown that the batteries can equally share the active and reactive power of the load even after the load event at 20 s. To support the active power increase in the demand, the frequency will drop and the batteries will settle in a lower frequency (0.91 p.u.). Furthermore, since the load active power has increased after 20 s, the voltage will also drop and settle to new synchronized value (0.94 p.u.).

Figure 6.

Primary frequency response to a dynamic load change.

4.3 Secondary frequency response

The third case, the performance of the secondary voltage and frequency controller during a load change event is studied. The system starts with 0.5+j0.5p.u.load and the load increases to 1+j1p.u.after 20 s. The secondary distributed controller is reactivated by tuning C0ωand C0Vto 1, as illustrated in Figure 7. It is observed that the load sharing is successfully achieved among the storage units. In addition, the voltage and frequency are regulated to 1 p.u. in less than 3 s after the load change.

Figure 7.

Secondary frequency controller response to a dynamic load change.

4.4 Severe load change

In the last case, the performance of the proposed power sharing and voltage/frequency restoration algorithms in handling a severe load change is examined. The system initiates with 0.5+j0.5p.u.load and a load change of 1 p.u. is applied after 20 s. This means the total load increases to 1.5+j1.5p.u.after 20 s. As it can be observed in Figure 8, the proposed distributed controller can equally share the active and reactive load change while regulating the voltage and frequency. It should be noted that the frequency drops to 0.75 p.u. after the load change, but it is quickly recovered within a few seconds. Similarly, the voltage drops to 0.6 p.u. after the load change, but it is recovered within 2 s. This case study showed that the proposed controller can successfully operate under severe load changes.

Figure 8.

Response of the system under severe dynamic load change.

5. Conclusion

This chapter proposed a novel distributed controller that can synchronize the operation of distributed energy storage units in smart grids. By minimizing the communication links between the neighboring storage units, the storage units share information (voltage/current readings) with their neighbors to share the active/reactive demand based on their capacities. Furthermore, a virtual leader is designed and supplemented to one storage unit to regulate the voltage and frequency and to provide secondary frequency response to the system. Results showed the effectiveness of the proposed algorithms in equally sharing the active power and reactive power of load during constant power load, and load change events. Furthermore, the secondary controller could successfully regulate the voltage and frequency of the system during constant load, load change, and severe load change events.

6. Future work

Future studies will focus on: (1) hardware validation of proposed approaches and (2) expansion of the developed controllers to solar and wind energy applications.

Conflict of interest

The authors declare no conflict of interest.


Parameters of the system are shown in Table 1.

Nominal power100 MW
Nominal voltage132 kV
DiP[p.u.][1 1.2 1.5 2 1.6]
DiQ[p.u.][1 1.1 1.25 1.45 1.5]
C00.5 p.u.
C1, C2, C30.1, 0.4, 0.2 p.u.

Table 1.

Parameters of the system.

© 2020 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution-NonCommercial 4.0 License, which permits use, distribution and reproduction for non-commercial purposes, provided the original is properly cited.

How to cite and reference

Link to this chapter Copy to clipboard

Cite this chapter Copy to clipboard

Javad Khazaei and Dinh Hoa Nguyen (February 17th 2021). Consensus Control of Distributed Battery Energy Storage Devices in Smart Grids, AI and Learning Systems - Industrial Applications and Future Directions, Konstantinos Kyprianidis and Erik Dahlquist, IntechOpen, DOI: 10.5772/intechopen.93409. Available from:

chapter statistics

33total chapter downloads

More statistics for editors and authors

Login to your personal dashboard for more detailed statistics on your publications.

Access personal reporting

Related Content

This Book

Next chapter

Power Flow Management Algorithm for a Remote Microgrid Based on Artificial Intelligence Techniques

By Karim Belmokhtar and Mauricio Higuita Cano

Related Book

First chapter

Combustion of Biomass Fuel and Residues: Emissions Production Perspective

By Emília Hroncová, Juraj Ladomerský, Ján Valíček and Ladislav Dzurenda

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

More About Us