Optimization-Based Power Distribution Method for state of charge Balancing of Battery Storage Systems

One option how to scale up the capacity and power of the battery energy storages is to group multiple physical devices into one system. To do so, it is necessary to maintain a balanced state of charge among multiple batteries in a group. In this paper, we propose a method that optimizes the power distribution among batteries considering their charge levels, temperature and power request. With this method, a trade-off between the rate of reaching the equilibrium, deviation of temperature range, and battery storage overuse is adjustable according to the actual needs. In the objective function, a difference between the initial and target charge level is penalized, together with additional technological and operational parameters. The proposed method was tested and evaluated in the simulation as well as on a real-world group of battery storage systems. The results showed the method is suitable for power distribution among heterogeneous storage systems if the energy state balance has to be reached and maintained with respect to the temperature limits.


I. INTRODUCTION
Expansion of battery energy storage systems (BESS) in power systems is unmissable. Battery systems that accompany intermittent renewable energy sources provide several costsaving functionalities or ancillary services that help to stabilize the grid. The integration of BESS into microgrids creates new control challenges to ensure safe, reliable, efficient, and economically sustainable operation. Independent battery storages can be grouped together to form an aggregated battery that, from an outside view, behaves as a single asset. However, for the grouped asset to perform at its maximum potential, the state of charge (SoC) of all individual batteries must be kept close to each other.
Usual approach to reach SoC balance is with adaptive droop control that extends conventional droop control. With conventional droop control BESS share the power proportionately to their power ratings without considering the actual SoC. With adaptive droop control, the droop coefficients are adjusted according to the SoC values [1]. Simply speaking, the units with higher SoC discharge at higher rate (or charge at lower rate) while units with lower SoC discharge more slowly (or charge faster). The result is that energy level in system with higher SoC decreases faster and differences in SoC slowly diminished until the power is shared equally and states are synchronized. The advantage of droop control is that it can be used in distributive or decentralized manner. In an adaptive droop control, the droop coefficients are adaptively adjusted according to the current SoC. In [2], [3], the coefficient is proportional to the n th order of SoC when charging (inversely when discharging), where n is tunable parameter of the balancing speed. To adjust droop coefficients, other functions of SoC can be used, e.g. natural exponential function [4], or arctangent function [5]. Instead of adaptive droop gain, the active power can be controlled using frequency scheduling as proposed in [6]. The main disadvantage of the methods referenced above is that they are ill-suited for systems with different nominal capacities. Further, the battery output power limits are not taken into account at all, or are constrained afterwards by saturation clipping as in [7].
To prevent nonuniform aging of battery packs or faster capacity fading, it might be desirable to balance SoC together with temperatures. Such simultaneous balancing is reviewed in [8] with focus on battery cells and not the whole battery systems. Cell balancing is widely investigated, but it differs from balancing SoC on the BESS scale since there is no direct control of active power within cells and it could be done passively by dissipating the energy [9].
Reviewed approaches do not consider exchanging energy between BESS, i.e. discharging batteries deliver power to other batteries that are charging. In [10], the authors have proposed a control strategy that eliminates energy exchange by ensuring all battery systems only charge or discharge. Meaning, state can only move closer to the average SoC of other units or stay the same. As a battery SoC approaches the average, risk of rapid power output switching occurs, what has been overcome by introducing the boundary layers inside which the controller swaps to a linear interpolation. Exchanging energy might be undesirable due to worse efficiency and lifetime degradation because of unnecessary cycling, but also desirable if reaching the SoC balance is a priority.
The optimization-based method for power distribution to equalize SoC is proposed in [11]. It is shown that usage of equal division method leads to SoC imbalance if batteries differ in capacities, while with optimization method SoC differences gradually decrease. There are optimization-based power sharing methods to maximize energy efficiency [12] and that also address the SoC imbalance [13]. It is assumed that efficiency and thus energy losses are mainly affected by SoC and output power. A piecewise linear approximation is used to formulate the Lagrangian equation and solve the convex problem. This maximum energy efficiency algorithm is combined with the algorithm that shares power according to the ratio of SoC to prevent one-sided exhaustion of energy.
In this paper, we propose an alternative optimization-based strategy of power distribution between a group of battery storage systems, given desired total power setpoint while being aware of the possible problems (over-charging/discharging, slow behaviour, oscillations, heterogeneous parameters, energy transfers, temperatures). The contribution of this paper is in developing the SoC balancing method where • amount of energy exchange is customizable, • controller is aware of unit's temperatures and maintains them in desired range, • units may have different capacities, power and SoC limits, • power output oscillations are suppressed. The proposed approach is tested in a closed-loop simulation to show borderline situations and then is deployed in a real system to ensure a smooth operation of battery units at the industrial site.

II. PROBLEM STATEMENT
The battery energy storage system ( Fig. 1) is composed of battery cells that store the energy, one or multiple inverters that are interfacing the grid and are responsible for power conversion, battery management system (BMS), and heating, ventilation, and air conditioning (HVAC) unit.
The whole system ( Fig. 2) consists of multiple aggregated battery storages that form a battery group receiving one total power setpoint from the energy management system (EMS). The objective is to devise an algorithm that distributes the total power demand between units inside the group, maximize group potential, and keeps temperatures within limits. Each unit is equipped with own BMS that is responsible for proper realization of given partial power setpoint, and for states measurements that sends back to the supervisory controller. Each battery unit may have different parameters, operating ranges, and be in a different initial state. From the microgrid point of view, the group of BESS behaves as one energy storage, capacity of which is the sum of individual capacities and maximum output power is the sum of individual power limits. This does not hold true when states are not in balance.
An example with two 100 kWh storages: in one case both have 50 % SoC, in other case the first one is full, the second one is empty. In both cases their grouped capacity is 100 kWh, however in the second case the maximum group output power is limited to half due to the fact that a full one cannot charge and empty one cannot discharge.
The aim is to minimize differences in SoC as they occur during the operation. Some units may have power inverters of different size or different energy capacity as other units, what will inevitably lead to SoC imbalances as some will loose energy more faster related to others. Thus, it is not possible to constantly keep same SoC everywhere due to the asymmetry. Furthermore, severe violation of temperature limits may cause unavailability of the whole unit.

III. METHODOLOGY
Partial power setpoints for each BESS are obtained from solving an optimization problem. In this section, the model of the battery, objective function and appropriate constraints are reviewed. The parameters are described in Table I, decision  variables in Table II.

A. Battery Energy System Model
Each BESS unit i ∈ B, where B = {1, . . . , N } and N is number of units inside a group, is characterized by its energy capacity E i , maximum charging and discharging power of inverters P ch i , P dch i , maximum and minimum SoC limits S i , S i in range [0, 1]. Initial state of the i th BESS is described with its state of charge S 0,i , actual output powers P ch 0,i , P dch 0,i , and temperature of the cells T 0,i . Symbols of variables illustrated in Fig. 3.
We would like to optimize powers for each unit P ch i , P dch i , given total group power setpoint P tot that has positive value when system should charge and negative when discharging.
The state of charge is defined as the ratio of the actual Fig. 3: Scheme of the BESS with parameters, input and states variables.
capacity and the nominal capacity E i . Dynamics of SoC described by applied power is where this and following equations apply ∀i ∈ B. The change of SoC in discrete time and value of S i for the next time step with sampling time ∆t in hourly units can be expressed as According to the temperature model of the battery, the amount of generated heat depends on two factors -output power and current state of charge. The relation of the generated heat flow Q gen i for unit i can be expressed with quadratic polynomial where a P i , b P i , a S i , b S i and c i are fitted coefficients. Temperature of the cells is then updated according to the equation where Q cool i is amount of cooling heat flow, m i and c p,i are the mass and specific heat capacity of the i th battery cells.

B. Constraints
The states should stay inside limits, specific for each BESS, to prevent over-charge and over-discharge that may lead to safety problems and speed up degradation processes. Boundaries of state variables are formulated as soft constraints to ensure feasibility under any conditions where ϵ SoC i and ϵ SoC i are slack variables representing the constraint violation.
The requirement of the procedure is to ensure the total power demand is provided by individual units. Sum of their powers should be equal to the given setpoint P tot . The slack variables ϵ ch and ϵ dch represent power that the system is not able to provide under given conditions.
Maximum power of unit is limited by size of its inverters If no additional constraints are given, units may transfer energy between each other, so more charged batteries would supply power to the emptier ones. This behavior may or may not be desirable. Therefore, we introduce the parameter P tfr to define maximum allowed transfer power between individual BESS. Furthermore, we introduce binary parameter δ ch equal 1 when P tot > 0, so the whole system should charge, zero otherwise, and binary parameter δ dch = 1 when P tot < 0. Following constraints will prevent power transfer above value P tfr (8d)

C. Objective
The aim is to balance the state of charge, therefore the objective is formulated to minimize the differences between initial SoC and target SoC value. Target SoC value is not a simple average of all unit's SoC, but it is unique for each BESS as it depends on its operating range. These individual SoC setpoints are found in two steps. First, we compute the total SoC of the group via Then, the target for the i th unit can be computed by In the objective function, the first term to be minimized is the squared difference between the SoC one sampling period ahead (according to eq. (2)) and the target SoC, which ensures each BESS approaches its target where q SoC is the weight associated with SoC imbalance. Further, the slacks have to be penalized in the objective with weights large enough to keep slacks at zero, if hardconstrained problem would be feasible. The term in the objective is where q ϵ,SoC is weight associated with violating the SoC limits and q ϵ,P with not reaching the power demand.
To prevent rapid switching of power output between units each time step (demonstrated in section IV-A, Fig. 6), another term in the objective with weight q dif adds delta penalization of output power Even with delta penalization unwanted oscillations might occur. To suppress them, power should be distributed between units as evenly as possible. This can be achieved by accounting for the following term in the cost function: where q evn is the weight coefficient.
To balance temperatures as well, units with higher temperature are penalized more for active use as they generate more heat. There is a temperature limit T lim over which the penalization increases linearly. Penalization coefficient p temp i is for each unit i computed as where q temp i is the weight coefficient for temperature penalization. Term in the objective function is formulated as where α ch i and α dch i are factors that differs between heat impact of charging and discharging processes.
Power output setpoint values for individual units come as the results from minimizing multivariate quadratic function subject to linear constraints. The optimization problem is formulated from the above-mentioned equations as follows: minimize (11) + (12) + (13) + (14) + (16) , (17a) subject to (2), (5a-d), (6a-c), (7a-b), (8a-d) , where unknown optimized variables are P ch i , P dch i , S i and slacks ϵ SoC i , ϵ SoC i , ϵ ch , ϵ dch . The optimization is solved whenever the initial conditions or total power demand changes, or there is an SoC imbalance, so at every time step unless P tot = 0 and S i − S tgt i = 0 for all i ∈ B.

IV. NUMERICAL RESULTS
The proposed method is validated in the simulation and in the experiment with a real equipment.

A. Simulation Verification
The simulation was performed using a system that consists of four battery storage units with parameters and initial values summarized in Table III. Maximum charging and discharging powers are equal P ch i = P dch i = P i . Parameters for temperature model are summarized in Table IV and are assumed to be identical for each BESS unit. Cooling flow rate Q cool i was set to 1.5 kW if the temperature was higher than 22 • C, otherwise it was set off. Above T lim = 30 • C the units are penalized for providing the power. The mass of battery cells is m i = 826 kg and specific heat capacity is c p,i = 1.15 J kg −1 K −1 .  Fig. 4 shows results of the 2.5 hours long simulation case with 1 s sampling, when no transfer energy was allowed, P tfr = 0 kW. Total power setpoint changes every half an hour and the system is maintained in the range of conditions that allow total power output demand to be met at each time instance. As desired, the system of four units slowly approach state of charge balance and get temperatures below given limit. The SoC offset between interval 01:30-02:00 is caused by high temperature of the BESS number 4 and therefore it can not charge at higher rate to reach target SoC.
The second case shown in Fig. 5 illustrates the effect of the energy transfer, when 50 kW of power is allowed to be exchanged between units. The state of charge balance is reached faster and it is easier to maintain. The units are active even when there is no charging or discharging power demand, during the interval until 00:30.
Another simulation case study shows reasoning behind including the terms (13) and (14) to the objective. It is illustrated with a sample case of critical situation that may arise, Fig. 6 shows behaviour of 2 uniform BESS with maximum output power 2×50 kW = 100 kW and constant power demand P tot = 100 kW, with and without penalization (13) and (14).

B. Experimental Case Study
The proposed algorithm was deployed into a control system of a industrial-scale microgrid which aggregates two lithiumion LFP chemistry battery storages. BESS parameters are listed in Table V. The control window was 3.5 hour long, in which the power demand setpoint P tot was changing every time step according to the microgrid needs. Proposed algorithm had to decide how to distribute power among the batteries, they were allowed to exchange up to 30 kW of power. The HVAC system was not directly controlled. The results are shown in Fig. 7

V. CONCLUSION
When multiple battery storages are aggregated into a group, it is expected they provide value as one uniform battery. To do so, group power demand must be distributed across the system in a manner that guarantees the execution of the power request while maximizing the system potential. Method that balances state of charge while considering cell temperatures was designed as a convex optimization problem that is solved at every time step. The objective function minimizes a difference between initial and target SoC. Dynamics of battery SoC and battery temperature model are included in problem formulation. Proposed method that is aware of accompanied problem such as energy transfer, was verified in several simulation cases before it was put into the operation. Algorithm proved to reach desired SoC balance and temperature range, while satisfying the microgrid needs.