Distributed control of energy storages for multi-time-step peak load shaving in a microgrid

Distributed energy storages (ESs) will be widely used in the future smart microgrids due to their continuous technology improvement and cost reduction. Meanwhile, the distributed control method also gains increasing attention for controlling distributed devices to protect user privacy and reduce computation burden compared with the centralized scheme. In this paper, a distributed control method of ESs is proposed for multi-time-step peak load shaving in a microgrid. Considering the ES efficiency is related to its power, an optimization is constructed to minimize the power loss during ES operations when performing peak load shaving function. By analyzing the net load curve and the ES available capacity, the multi-time-step peak load shaving problem is transformed into single-time-step ES operations at each time step. The Combine-Then-Adapt diffusion strategy is united with the consensus + innovation strategy to realize the peak load shaving in a fully distributed way. Case studies verify the efficiency of the proposed method.


Introduction
Affected by the variation of user consumption in different periods and the randomness of renewable energy, the total net load of the microgrid usually presents great fluctuations, and excessive power demand will jeopardize the network security [1].With the continuous cost reduction and the technology upgrading of energy storages (ESs), distributed ESs on the demand side can be used for peak shaving and valley filling of the microgrid and improving power quality [2].
ESs are usually controlled by centralized, decentralized, and distributed control methods.In particular, compared with the other two methods, distributed control can take into account the advantages of protecting user privacy, reducing computation burden, and realizing multi-device collaboration, which has attracted widespread attention in smart microgrids [3].
A single-time-step distributed solution for ESs is proposed in [4] to achieve the supply-demand balance and welfare maximum.In [5], an online convex optimization-based distributed control method is used to realize the voltage regulation in distribution networks.To realize the energy balance of ESs and peak load shaving at the same time, a distributed coordinated control scheme is proposed in [6] by using the consensus algorithm.In addition, in [7], Xu et al. point out that there is approximately a linear relationship between ES efficiency and power.Therefore, when using ESs for peak load shaving, on the one hand, it is necessary to consider the difference in the efficiency of each distributed ES, so as to minimize the total power loss through power distribution among ESs; on the other hand, it is also important to consider future net load changes to determine the current ES power.
Hence, in this paper, a distributed multi-time-step peak load shaving method is proposed to coordinate multiple distributed ESs in a microgrid and reduce power loss existing in ES operations.The remainder of this paper is organized as follows: the modeling of ESs for peak load shaving is formulated in Section 2; the distributed coordination method is introduced in Section 3; Section 4 exhibits case studies and conclusions are drawn in Section 5.

Single-time-step peak load shaving considering ES power loss
In this paper, the microgrid integrates photovoltaics (PVs), ESs, and loads.The PV output can be regarded as a load with a negative electricity consumption.Herein, the average value of the load profile is denoted as L P .If the total capacity of ESs is large enough, all fluctuations can be eliminated theoretically, so that the final net load fluctuation is constant, and the control of ESs can be designed as follows  mean the charging and discharging efficiency, respectively.In [7], Xu et al. point out that there is a linear relationship between the ES efficiency and the power: where i a and i b are given parameters decided by ES characteristics.
Since the efficiency of each ES is inconsistent, it is necessary to reasonably allocate the charging/discharging power among all ESs to minimize the total power loss when the total charge and discharge sum L P  of ESs is fixed.For simplicity, the rest of the paper only gives charge mode for ES operations, and the discharge mode can be derived in a similar way.Therefore, in the case of a certain total charging power of ESs, the total power charged into the ESs can be maximum, which indicates the optimization in the following.
where B,max i P is the maximum power of ES at node i.To solve this optimization, the Lagrangian form of optimization ( 4) can be first constructed as where i  , i  , and i  refer to the Lagrangian multipliers for equality and inequality, respectively.
Then the optimal conditions of the optimization (4) are given as follows:

Multi-time-step peak load shaving
Since the ES capacity is not infinite, the multi-time-step ES operation needs to be considered for peak load shaving.To ensure that the current ES control can take into account future load fluctuations, the current total ES power may not be equal with . Therefore, it is necessary to construct an efficient method to transform the multi-time-step problem into determining the charging/discharging power of ESs in each single-time step.
The ES can increase stored energy when the load is low for the subsequent discharge to ameliorate the load peak and can reduce the energy level at the load peak to have a larger charging space for the later low load period.Subscript t is defined as the time index and t  is a time interval.It is assumed that the load fluctuation of each node is predictable during a period, and the total net load

Distributed peak load shaving method
A microgrid can be denoted as a connected graph

( , ) G V E =
, where the node inside is represented by a vertex or called an agent.The vertex set is given as {1, 2,..., } Vn = , and the edge from vertex i to j is marked as ( , ) i m is the number of the neighborhood of the node i.To realize the distributed peak load shaving method, both ( 6) and ( 7) should be carried out in a distributed manner, which is achieved by the Combine-Then-Adapt diffusion (CTA) strategy and the consensus + innovation strategy, respectively.

Combine-Then-Adapt diffusion strategy
The communication coefficient ij c of agent i and agent j is defined as follows: Then, if agent i possesses a local message i x , the following iterations of the CTA strategy for agent i can be performed to acquire the average value of i x among all agents [8].
where It can be seen that each agent only needs to communicate with the neighboring agents to quickly calculate an average value of all agent data in a network, and the information transmitted does not involve the specific information i x of the agent itself, which ensures privacy protection.
Using the CTA strategy, local message i x can be set as the nodal net power of each agent.When the convergence condition [ 1] [ ]  7) is further calculated in a distributed manner.

Consensus +innovation strategy
To solve the optimization (5), a consensus + innovation strategy [9] is utilized to satisfy optimal conditions (6).Specifically, the consensus item will promote all agents to reach the same marginal cost is the innovation item.The convergence condition is given by ,, [ 1] [ ]  , where c e and i e are the convergence precision.When the convergence condition is satisfied, the B , [ 1] it Pk + can be used to guide the ES operation.
At last, the model predictive control [10] is finally used to make the decision more robust to stochastic load changes, since the main idea of model predictive control is to employ a prediction of future load variations within the receding horizon to decide the current ES operation.

Case study
A 14-node test microgrid in [9] is used to verify the performance of the proposed method, which is presented in Figure 1.The parameters of ESs are given in Table 1.As for the CTA strategy, 0.001   Using the proposed method, the net load power changes of the microgrid before and after control are presented in Figure 2, and the power and stored energy changes of each ES are shown in Figure 3 and Figure 4, respectively.Evidently, the microgrid's load valley experiences an increase in demand, while effectively mitigating load peaks.To elaborate, during the initial load valley phase, power predictions within a 100minute window are considered, and each agent employs the CTA strategy to identify the valley state of the load.Subsequently, they determine their respective ES charging power based on a consensus + innovation strategy.As illustrated in Figure 3, ESs located at Nodes 2, 5, and 7, each with a capacity of 20 kWh, exhibit larger charging power corresponding to higher charging efficiencies.This approach yields a greater total energy injection into all ES units with reduced power losses, under the premise of the same total charging power.Moreover, ESs situated at Nodes 3 and 13, each possessing a 30 kWh capacity and identical charging efficiencies, yield overlapping charging profiles.Ultimately, the available ES capacity is fully utilized, and at the end of the load valley period, the energy stored by each ES basically reaches the maximum.
During the subsequent load peak, informed by the power forecast within 100 minutes, agents can discern the necessity for ES discharge.Consequently, each ES allocates discharging power across successive time intervals within the discharge period, maximizing power output at the load peak, thus effectively mitigating peak load demand.
The example at t=50 minutes is considered to illustrate the convergence of the CTA strategy and the consensus + innovation strategy.In accordance with the CTA strategy, the net load changes during iterations, computed via distributed calculations by each agent, are depicted in Figure 5.This process comprises a total of 89 iterations, during which all 14 agents converge to a final value of 23.11 kW, resulting in a total load calculation of 323.5 kW.It is worth noting that the 30th iteration brings the calculated power of each agent remarkably close to the ultimate average value, showcasing the rapid convergence characteristics of the CTA strategy.Concerning the consensus + innovation strategy, Figure 6 illustrates that the Lagrangian multipliers , it  of different agents converge to a common value after approximately 200 iterations.This convergence assures the optimality of the obtained results.

Conclusion
In this paper, distributed ESs are employed for multi-time-step peak load shaving in a microgrid.As the charging/discharging efficiency of ES will change with the ES power, the control objective is to carry out peak load shaving as well as minimize the total power loss associated with ES operations.The CTA strategy is used for analyzing the net load curve to obtain the corresponding charging/discharging periods and calculating the available capacity of all ESs in each period in a distributed way.Then the multi-time-step peak shaving optimization problem can be transformed into the single-time-step form.Afterward, the consensus + innovation strategy is formulated to satisfy the optimal condition of the optimization and acquire the optimal ES operations for each agent at each time step in a distributed manner.Case studies based on a 14-bus microgrid demonstrate the efficiency of the proposed method.

i
, while the innovation item guarantees the equation constraints BL = multi-time steps, time index t is added to i  and B i P , and the corresponding iterative update calculation of the consensus + innovation strategy for agent i is given as follows: period is 300 minutes, and the predictive horizon of model predictive control is set as 100 minutes.

Figure 2 .
Figure 2. Net power changes of the microgrid before and after control.

Figure 3 .
Figure 3.The power changes of all Ess.

6 Figure 4 .
Figure 4.The stored energy changes of all Ess.

Figure 5 .
Figure 5. Average nodal net power calculation among agents through CTA strategy.
Finally, the peak shaving ES in multi-time steps can be quickly changed into a single-time-step ES operation.In regard to the charge period, the adjustment amount , then the load within the period from t1 to t2 can be adjusted to L P ; otherwise, the threshold value Th needs to be constructed so that the area where E at the beginning of the discharge period t2 must take into account the power already charged during the charge period from t1 to t2.