In recent years, the integration of renewable energy sources into power systems has accelerated due to their clean, low-cost, and widely distributed characteristics. This trend has introduced new challenges to conventional power grids, leading to the emergence of microgrids. A microgrid typically consists of distributed generators, energy storage systems, and loads, and it can operate either in grid-connected mode or islanded mode. Among the many components of a microgrid, the battery energy storage system plays a vital role in maintaining power balance and improving power quality. However, a critical issue is the imbalance of the state-of-charge (SoC) among individual battery cells. If the SoC is not properly coordinated, some energy storage batteries may be overcharged or over-discharged, which dramatically shortens the battery lifetime and may even cause safety hazards. Therefore, designing effective control strategies for SoC balancing is of great practical significance.
In this work, we focus on the event-triggered SoC consensus control problem for battery energy storage systems in microgrids. We propose a distributed control protocol that introduces a virtual leader as a reference signal. Each energy storage battery tracks this virtual leader to achieve a common SoC during charging and discharging processes, while respecting predefined upper and lower bounds to avoid overcharging and over-discharging. Unlike traditional time-triggered control schemes, our event-triggered mechanism significantly reduces communication burden by allowing each energy storage battery to update its control input only at event times determined by a well-designed triggering condition. This is particularly beneficial in microgrid applications where communication resources are often limited.
The main contributions of this paper are summarized as follows. First, compared with existing consensus-based methods that require explicit estimation of the average SoC, our algorithm does not need such global information. Second, we explicitly incorporate charging and discharging thresholds into the controller design, thus directly preventing overcharge and overdischarge of energy storage batteries. Third, we provide a rigorous stability analysis using Lyapunov methods and prove that the proposed event-triggering condition guarantees Zeno-free behavior. We also verify the effectiveness of the proposed method through numerical simulations for both charging and discharging scenarios.
The remainder of this paper is organized as follows. Section 1 introduces the mathematical model of the battery energy storage system and formulates the SoC consensus problem using graph theory. Section 2 presents the event-triggered distributed control protocol and the triggering condition. Section 3 gives the main theoretical results, including sufficient conditions for asymptotic SoC consensus and the lower bound of inter-event times. Section 4 provides simulation results in both charging and discharging modes. Finally, Section 5 concludes the paper.
1. System Modeling and Problem Formulation
We consider a network of \(N\) energy storage batteries interconnected through a communication graph. Each energy storage battery is modeled using the commonly used coulomb counting method. Let \(S_i(t)\) denote the state-of-charge of battery \(i\) at time \(t\), \(S_i(0)\) the initial SoC, \(C_i\) the nominal capacity, and \(I_i(t)\) the output current. The dynamic equation is given by:
\[
S_i(t) = S_i(0) – \frac{1}{C_i}\int_0^t I_i(\tau)\,d\tau,\quad i=1,2,\dots,N.
\]
Differentiating both sides with respect to time yields the SoC dynamics:
\[
\dot{S}_i(t) = -\frac{I_i(t)}{C_i},\quad i=1,2,\dots,N.
\]
Assuming that the converter power loss is negligible and that all energy storage batteries have the same output voltage \(V_i\), the output power \(P_i(t)\) is:
\[
P_i(t) = V_i I_i(t).
\]
When \(P_i(t)>0\), the battery discharges; when \(P_i(t)<0\), it charges. Combining the above equations, we obtain the relationship between the SoC variable \(S_i(t)\) and the output power \(P_i(t)\):
\[
\dot{S}_i(t) = -\frac{P_i(t)}{C_i V_i}.
\]
For convenience, we define \(x_i(t) = S_i(t)\), \(u_i(t) = P_i(t)\), and \(m_i = -1/(C_i V_i)\). Then the SoC dynamics of each energy storage battery can be expressed as a first-order linear system:
\[
\dot{x}_i(t) = m_i u_i(t),\quad i=1,2,\dots,N.
\]
In this formulation, the control input \(u_i(t)\) is the power injection or absorption, and \(m_i\) captures the effect of battery capacity and voltage. Since the capacities and voltages of energy storage batteries may differ, the system is inherently heterogeneous.
The communication topology among the \(N\) energy storage batteries is represented by a directed graph \(\mathcal{G} = (\mathcal{V},\mathcal{E})\), where \(\mathcal{V} = \{1,2,\dots,N\}\) is the vertex set and \(\mathcal{E} \subseteq \mathcal{V}\times\mathcal{V}\) is the edge set. An edge \((j,i)\) means that battery \(j\) can transmit information to battery \(i\). The neighbor set of vertex \(i\) is denoted by \(\mathcal{N}_i = \{j \mid (j,i)\in\mathcal{E}, j\neq i\}\). The adjacency matrix \(A = [a_{ij}] \in \mathbb{R}^{N\times N}\) is defined with \(a_{ii}=0\), \(a_{ij}=\mu\) if there is a directed edge from \(j\) to \(i\), and \(a_{ij}=0\) otherwise, where \(\mu>0\). The Laplacian matrix \(L = [l_{ij}] \in \mathbb{R}^{N\times N}\) is defined by:
\[
l_{ij} =
\begin{cases}
-a_{ij}, & i\neq j,\\
\sum_{k=1,k\neq j}^{N} a_{ik}, & i=j.
\end{cases}
\]
The overall system also contains a virtual leader, labeled as node 0, which provides the reference SoC trajectory. The communication weight between the virtual leader and follower \(i\) is denoted by \(d_i\), with \(d_i=1\) if there is a directed edge from the virtual leader to \(i\), and \(d_i=0\) otherwise. The augmented graph is denoted by \(\bar{\mathcal{G}}\).
To avoid overcharging and overdischarging, we set an upper threshold of 100% SoC and a lower threshold of 20% SoC. The control objective is to design a state feedback controller for each energy storage battery such that for any initial state \(x_i(0)\), the SoC of all batteries reaches asymptotically the same value as the virtual leader:
\[
\lim_{t\to\infty} \|x_i(t)-x_j(t)\| = 0,\quad
\lim_{t\to\infty} \|x_i(t)-x_0(t)\| = 0,\quad \forall i,j\in\mathcal{V}.
\]
During charging, the power input \(P_i(t)<0\) and the virtual leader reference set to 100%, so \(x_0(t)\to 1\) and \(P_i(t)\to 0\) as \(t\to\infty\). During discharging, \(P_i(t)>0\) and \(x_0(t)\to 0.2\), with \(P_i(t)\to 0\).
To reduce communication overhead, we introduce an event-triggered mechanism. Each energy storage battery continuously monitors its own state \(x_i(t)\) but only broadcasts its state at event times \(t_i^0, t_i^1, t_i^2, \dots\). The latest broadcast state of battery \(i\) is denoted as:
\[
\hat{x}_i(t) = x_i(t_i^k),\quad t\in[t_i^k, t_i^{k+1}).
\]
At any time \(t\), battery \(i\) uses \(\hat{x}_i(t)\) and the latest broadcast states of its neighbors \(\hat{x}_j(t)\) for \(j\in\mathcal{N}_i\) to compute its control input. The distributed control protocol is designed as:
\[
u_i(t) = K \left[\sum_{j\in\mathcal{N}_i} a_{ij} \left(\hat{x}_i(t)-\hat{x}_j(t)\right) + d_i \left(\hat{x}_i(t)-x_0(t)\right)\right],
\]
where \(K\) is the feedback gain to be designed. Define the measurement error \(e_i(t) = \hat{x}_i(t)-x_i(t)\) and the tracking error \(\delta_i(t) = x_i(t)-x_0(t)\). Then the control protocol can be rewritten as:
\[
u_i(t) = K \left[\sum_{j\in\mathcal{N}_i} a_{ij} \left((\delta_i(t)-\delta_j(t))+(e_i(t)-e_j(t))\right) + d_i(\delta_i(t)+e_i(t))\right].
\]
Differentiating \(\delta_i(t)\) and substituting the above control input yields the closed-loop error dynamics:
\[
\dot{\delta}_i(t) = m_i K \left[\sum_{j\in\mathcal{N}_i} a_{ij} \left((\delta_i(t)-\delta_j(t))+(e_i(t)-e_j(t))\right)+d_i(\delta_i(t)+e_i(t))\right].
\]
Let \(m = \operatorname{diag}(m_1,m_2,\dots,m_N)\), \(\delta(t)=[\delta_1(t),\delta_2(t),\dots,\delta_N(t)]^T\), \(e(t)=[e_1(t),e_2(t),\dots,e_N(t)]^T\), and \(B=\operatorname{diag}(d_1,d_2,\dots,d_N)\). Then the compact form of the error dynamics is:
\[
\dot{\delta}(t) = -Km(L+B)(\delta(t)+e(t)).
\]
Thus, the SoC consensus problem for the battery energy storage system is transformed into the stability problem of the above error system. If \(\delta(t)\to 0\) as \(t\to\infty\), then \(x_i(t)\to x_0(t)\) for all \(i\), achieving the desired SoC balance.
The event-triggering condition we adopt is of a centralized form. Let \(t_{k+1}\) denote the next triggering time, which is determined by:
\[
t_{k+1} = \inf\left\{t > t_k \mid \|e(t)\| \le \sigma \gamma \|\delta(t)\|\right\},
\]
where \(\sigma\in(0,1)\), \(\gamma = \lambda_{\min}(L+B) / \|L+B\|\), and \(\|\cdot\|\) denotes the 2-norm of a vector or matrix. This condition ensures that the measurement error remains relatively small compared to the state error, which is crucial for stability.
2. Event-Triggered Consensus Control Design
In this section, we first present the necessary lemmas and then state the main theorems.
2.1 Preliminaries
Lemma 1. Under Assumption 1, the following properties hold:
- The eigenvalues of matrix \(L+B\) are nonnegative real numbers.
- All eigenvalues of \(L+B\) are positive if and only if the communication graph \(\mathcal{G}\) is connected and undirected.
Lemma 2. Under Assumption 1, let \(\mathbf{1}\) be the column vector with all entries equal to 1. Define:
\[
p = [p_1,p_2,\dots,p_N]^T = (L+B)^{-T}\mathbf{1},\quad P = \operatorname{diag}(p_1,p_2,\dots,p_N),
\]
and
\[
Q = P(L+B) + (L+B)^T P.
\]
Then \(P>0\) and \(Q>0\).
These lemmas provide the necessary tools for constructing the Lyapunov function in the stability analysis.
2.2 Sufficient Condition for SoC Consensus
We are now ready to give the first main result.
Theorem 1. Suppose that Assumption 1 holds. Consider the battery energy storage system described by the first-order dynamics. Under the event-triggered control protocol with the triggering condition, if the feedback gain \(K\) is chosen such that \(K>0\), and the event-triggering parameter satisfies:
\[
\|e(t)\| \le \sigma \frac{\lambda_{\min}(L+B)}{\|L+B\|} \|\delta(t)\|,\quad \sigma\in(0,1),
\]
then the SoC of all energy storage batteries asymptotically tracks the virtual leader, i.e., \(x_i(t)\to x_0(t)\) as \(t\to\infty\) for all \(i\in\{1,2,\dots,N\}\).
Proof. Consider the Lyapunov function candidate:
\[
V(t) = \frac{1}{2}\delta^T(t) P \delta(t),
\]
where \(P\) is the positive definite matrix defined in Lemma 2. Taking the time derivative of \(V(t)\) along the trajectories of the closed-loop system yields:
\[
\dot{V}(t) = \delta^T(t) P \dot{\delta}(t) = -Km \delta^T(t) P (L+B)(\delta(t)+e(t)).
\]
Applying the properties of the matrix \(P\), we obtain:
\[
\dot{V}(t) \le -Km \lambda_{\min}(P) \lambda_{\min}(L+B) \left(\|\delta(t)\|^2 – \frac{\|L+B\|}{\lambda_{\min}(L+B)}\|\delta(t)\|\|e(t)\|\right).
\]
Using the triggering condition, we have:
\[
\|\delta(t)\|\|e(t)\| \le \sigma \frac{\lambda_{\min}(L+B)}{\|L+B\|}\|\delta(t)\|^2.
\]
Substituting this into the derivative inequality gives:
\[
\dot{V}(t) \le -(1-\sigma) Km \lambda_{\min}(P)\lambda_{\min}(L+B) \|\delta(t)\|^2 \le 0.
\]
Since \(\sigma\in(0,1)\), the right-hand side is negative definite. Therefore, the error system is asymptotically stable, and \(\lim_{t\to\infty}\|\delta(t)\|=0\). Consequently, \(x_i(t)\to x_0(t)\) for all \(i\), which completes the proof.
Remark 1. The feedback gain \(K\) directly affects the convergence speed of the SoC consensus. A larger \(K\) leads to faster convergence but may also increase the control effort. In practice, \(K\) should be chosen by considering the trade-off between convergence rate and actuator saturation.
2.3 Exclusion of Zeno Behavior
In event-triggered control, a given implementation is valid only if there is no Zeno behavior, i.e., infinitely many events in finite time. The following theorem provides a positive lower bound on the inter-event intervals.
Theorem 2. Consider the battery energy storage system with \(N\) first-order dynamics. Suppose Assumption 1 and the event-triggering condition hold. Then the time interval between any two consecutive event times \(t_{k+1}-t_k\) is bounded below by:
\[
\varepsilon = \frac{\sigma \lambda_{\min}(L+B)}{K \|m\| \|L+B\| \left(\|L+B\| + \sigma\lambda_{\min}(L+B)\right)}.
\]
Hence, no Zeno behavior occurs.
Proof. We consider the evolution of the ratio \(\frac{\|e(t)\|}{\|\delta(t)\|}\). Its time derivative satisfies:
\[
\frac{d}{dt}\frac{\|e(t)\|}{\|\delta(t)\|} \le \left(1+\frac{\|e(t)\|}{\|\delta(t)\|}\right) \frac{\|\dot{\delta}(t)\|}{\|\delta(t)\|}.
\]
From the closed-loop dynamics, we have:
\[
\|\dot{\delta}(t)\| \le K\|m\|\|L+B\|\left(\|\delta(t)\|+\|e(t)\|\right).
\]
Combining the two inequalities gives:
\[
\frac{d}{dt}\frac{\|e(t)\|}{\|\delta(t)\|} \le K\|m\|\|L+B\| \left(1+\frac{\|e(t)\|}{\|\delta(t)\|}\right)^2.
\]
Let \(y(t)=\frac{\|e(t)\|}{\|\delta(t)\|}\). Then:
\[
\dot{y}(t) \le K\|m\|\|L+B\| (1+y(t))^2.
\]
Consider the differential equation:
\[
\dot{\varphi}(t) = K\|m\|\|L+B\| (1+\varphi(t))^2,\quad \varphi(0,\varphi(0))=0.
\]
Integrating from \(0\) to \(\varepsilon\) yields:
\[
\varepsilon = \frac{\varphi(\varepsilon,0)}{K\|m\|\|L+B\|(1+\varphi(\varepsilon,0))}.
\]
At the triggering time, the ratio starts from zero and grows until it reaches \(\sigma\gamma\). Thus, \(\varphi(\varepsilon,0)=\sigma\gamma\). Substituting this into the above relation, we obtain:
\[
\varepsilon = \frac{\sigma\gamma}{K\|m\|\|L+B\|(1+\sigma\gamma)}
= \frac{\sigma \lambda_{\min}(L+B)}{K\|m\|\|L+B\|(\|L+B\|+\sigma\lambda_{\min}(L+B))}.
\]
This positive lower bound ensures that the inter-event times are strictly positive, ruling out Zeno behavior. This completes the proof.
Remark 2. There is an inherent trade-off between the minimum inter-event interval and the convergence rate. A larger \(K\) results in a smaller \(\varepsilon\), meaning faster convergence but potentially more frequent events. The designer should carefully select \(K\) and \(\sigma\) to balance these requirements.
3. Simulation Results and Discussion
In this section, we verify the theoretical results through numerical simulations using MATLAB. We consider a battery energy storage system composed of four energy storage batteries. The system parameters are summarized in Table 1.
| Item | Symbol | Value | Unit |
|---|---|---|---|
| Battery 1 voltage | \(V_1\) | 220 | V |
| Battery 2 voltage | \(V_2\) | 220 | V |
| Battery 3 voltage | \(V_3\) | 220 | V |
| Battery 4 voltage | \(V_4\) | 220 | V |
| Battery 1 capacity | \(C_1\) | 70 | Ah |
| Battery 2 capacity | \(C_2\) | 80 | Ah |
| Battery 3 capacity | \(C_3\) | 75 | Ah |
| Battery 4 capacity | \(C_4\) | 90 | Ah |
| Battery 1 initial SoC | \(x_1(0)\) | 75% | – |
| Battery 2 initial SoC | \(x_2(0)\) | 85% | – |
| Battery 3 initial SoC | \(x_3(0)\) | 72% | – |
| Battery 4 initial SoC | \(x_4(0)\) | 85% | – |
The communication topology is shown in Figure 1 as a directed graph with four follower nodes and one virtual leader node. For simplicity, we set the edge weights between neighbor nodes to 1. The Laplacian matrix \(L\) corresponding to the topology is computed as:
\[
L = \begin{bmatrix}
2 & -1 & -1 & 0\\
-1 & 2 & 0 & -1\\
-1 & 0 & 2 & -1\\
0 & -1 & -1 & 2
\end{bmatrix}.
\]
The diagonal matrix \(B\) representing the communication between the virtual leader and followers is:
\[
B = \operatorname{diag}(1,1,0,0).
\]
Then we calculate \(L+B\) and obtain its minimum eigenvalue \(\lambda_{\min}(L+B)=0.382\), and \(\|L+B\|=4.618\). The event-triggering parameter \(\gamma\) is therefore \(\gamma = 0.382/4.618 \approx 0.0827\). We choose \(\sigma=0.8\) for both charging and discharging scenarios.
3.1 Charging Mode
In the first simulation scenario, all energy storage batteries are in the charging mode. The initial SoC values are listed in Table 1. The feedback gain is chosen as \(K=1.4\), and the charging upper threshold is set to 1.0 (100%). Under the event-triggered control protocol, the four followers track the virtual leader’s SoC trajectory. We observe from the simulation results that all SoC curves asymptotically converge to 100%, despite the different initial SoC values and battery capacities. This indicates that the proposed controller successfully achieves SoC balance while preventing overcharging.
The power inputs \(P_i(t)\) are displayed in Figure 3 of the original paper. It can be observed that during the transient phase, batteries with lower initial SoC receive larger charging power, while batteries with higher initial SoC receive smaller charging power. As the SoC states converge to the reference value, the power inputs gradually decrease to zero. This behavior confirms that the event-triggered consensus controller automatically allocates power according to the SoC deficit, thus avoiding unnecessary overcharging.
Figure 4 illustrates the event-triggered times and the corresponding inter-event intervals for the charging mode. The inter-event intervals are always positive, which validates the absence of Zeno behavior. Moreover, the number of triggering events is much smaller than the number of sampling instants in a typical time-triggered implementation, demonstrating the communication-saving advantage of the proposed event-triggered strategy.
3.2 Discharging Mode
In the second simulation scenario, all energy storage batteries are in the discharging mode. The initial SoC values are set differently: \(x_1(0)=0.65\), \(x_2(0)=0.73\), \(x_3(0)=0.70\), and \(x_4(0)=0.72\). The feedback gain is again \(K=1.4\), and the discharging lower threshold is set to 0.2 (20%). The virtual leader reference is therefore \(x_0(t)=0.2\). The simulation results show that all SoC trajectories gradually approach 20%, achieving SoC consensus while preventing overdischarge.
The output power \(P_i(t)\) during discharging is shown in Figure 6. At the beginning, batteries with higher SoC deliver more power, whereas batteries with lower SoC deliver less power. As time progresses, the differences in SoC diminish, and all output powers converge to zero. This is exactly the desired behavior for prolonging the lifetime of the energy storage battery system.
Figure 7 depicts the event-triggered times and inter-event intervals for the discharging mode. As in the charging case, all inter-event intervals are positive, confirming that Zeno behavior is avoided. The event-triggered mechanism effectively reduces the number of state transmissions among the energy storage batteries, thereby lowering the communication burden.
3.3 Summary of Simulation Results
For clarity, we summarize the key simulation outcomes in Table 2.
| Mode | Initial SoC set | Reference threshold | Steady-state SoC | Steady-state power | Zeno behavior |
|---|---|---|---|---|---|
| Charging | \(x_1=0.75, x_2=0.85, x_3=0.72, x_4=0.85\) | 1.0 | 1.0 | 0 | No |
| Discharging | \(x_1=0.65, x_2=0.73, x_3=0.70, x_4=0.72\) | 0.2 | 0.2 | 0 | No |
From Table 2, we can clearly see that the proposed event-triggered consensus control algorithm achieves the SoC balancing goal in both operating modes. The energy storage batteries asymptotically reach the predefined reference thresholds, and their power inputs/outputs vanish at steady state. Therefore, the designed controller effectively prevents overcharging and overdischarging, which is critical for the safe and efficient operation of energy storage battery systems in microgrids.
4. Further Discussion and Comparison
To provide a deeper insight, we compare our method with some existing approaches in terms of required information and communication characteristics. The comparison is shown in Table 3.
| Method | Requires average SoC estimation | Communication mechanism | Overcharge/overdischarge protection |
|---|---|---|---|
| Average consensus based method [5] | Yes | Continuous | Not explicit |
| Dynamic average estimation [11] | Yes | Continuous | Not explicit |
| Sophisticated observer based method [9] | Yes | Periodic sampling | Not explicit |
| Virtual leader method without event-trigger [15] | No | Continuous | Not explicit |
| Our event-triggered virtual leader method | No | Event-triggered | Yes |
As indicated in Table 3, many existing consensus-based methods rely on the estimation of the average SoC, which introduces estimation errors and delays. Our method directly uses the virtual leader as a reference and does not require such global information. Moreover, the event-triggered mechanism significantly reduces communication frequency compared with continuous communication schemes. Finally, by explicitly setting charging/discharging thresholds in the controller, our method provides a built-in protection against overcharge and overdischarge, which is often neglected in conventional consensus protocols.
5. Conclusion
In this paper, we have investigated the event-triggered state-of-charge consensus problem for battery energy storage systems in microgrids. We proposed a virtual leader based distributed control protocol that drives each energy storage battery to track a common SoC reference, thereby achieving SoC balance during both charging and discharging processes. The main advantages of the proposed method are as follows:
- It does not require the estimation of the average SoC of the whole battery system, making it more practical in real applications.
- It explicitly incorporates charging and discharging thresholds, effectively preventing overcharging and overdischarging.
- It employs an event-triggered mechanism that reduces unnecessary communication among energy storage batteries, thereby saving network resources.
- It provides rigorous stability guarantees through Lyapunov analysis and excludes Zeno behavior through a positive lower bound on inter-event intervals.
Numerical simulations were carried out for two typical operating modes: charging mode and discharging mode. In both cases, the SoC of all energy storage batteries converged to the desired reference threshold, and the power input/output converged to zero, confirming the effectiveness of the theoretical results. The event-triggered times also verified that no Zeno behavior occurs.
Future work will extend the proposed approach to more complex scenarios, such as time-varying communication topologies, communication delays, and cyber-attacks. Furthermore, we plan to investigate distributed event-triggered mechanisms where each energy storage battery independently determines its own triggering condition, which may further improve scalability and resilience.
In summary, our event-triggered virtual leader consensus control scheme provides a practical and efficient solution for SoC balancing in battery energy storage systems, contributing to the safe and economical operation of microgrids.

