Optimal SoC Balancing Control for Lithium-Ion Battery Cells Connected in Series

The optimal state of charge (SoC) balancing control for series-connected lithium-ion battery cells is presented in this paper. A modified SoC balancing circuit for two adjacent cells, based on the principle of a bidirectional Cuk converter, is proposed. The optimal SoC balancing problem is established to minimize the SoC differences of cells and the energy loss subject to constraints of the normal SoC operating range, the balancing current, and current of cells. This optimization problem is solved using the sequential quadratic programming algorithm to determine the optimal duties of PWM signals applied to the SoC balancing circuits. An algorithm for the selection of the initial points for the optimal problem-solving process is proposed. It is applied in cases where the cost function has no decreasing part. Experimental tests are conducted for seven series-connected Samsung cells. The optimal SoC balancing control and SoC estimation algorithms are coded in MATLAB and embedded in LabVIEW to control the SoC balancing in real time. The test results show that the differences between the SoCs of cells converges to the desired range using the proposed optimal SoC balancing control strategy.


Introduction
Recently, batteries and fuel cells have been widely used in various fields, including the power industry, transportation, and portable devices, as a solution to energy shortages and environmental pollution problems [1][2][3]. Lithium-ion batteries (LIBs) are the most widely used batteries for electronic applications because they have many advantages such as high energy density, high voltage capacity, lower self-discharge rate than other rechargeable batteries, considerably lower price than lithium polymer batteries, and long charge-discharge cycles [3]. In the past, LIBs were used in portable devices such as computers, phones, and low-power measuring devices; accordingly, the battery source usually contained only one cell. Now, LIBs are gradually being used in electric vehicles (EVs), hybrid electrical vehicles (HEVs), and energy storage systems in the wind and solar power (WSP) industries to protect the environment [4,5]. In the near future, the LIB market could show significant growth in the power industry and transportation, as forecasted in [6].
To form a pack of LIBs with high power, LIB cells are connected in parallel and series to obtain the desired power and voltage. The remaining power in each LIB cell is indirectly reflected in its state of charge (SoC), which ranges from 0% to 100%. SoC depends on many factors including the voltage of the cell, ambient temperature of the cell, aging of the cell, To ensure that series-connected cells operate safely and to avoid events such as over discharging, overcharging, and explosion during operation, the electric energy of all cells in the pack must be equal. If a cell in the pack has lower SoC than other cells, it can be over-discharged, while the other cells in the pack still have energy. Consequently, that cell is damaged and may not be able to provide electrical energy to the load. Meanwhile, if a cell has higher SoC than other cells, it can be overcharged. A cell that is overcharged and over-discharged can explode, causing fire and/or damage to the device, as shown in Figure 2 [8]. The difference in SoC between cells connected in series is caused by many factors, such as manufacturing tolerances, different self-discharge rates, uneven operating temperature across the battery cells, and a non-uniform aging process [9]. In practical operations, it is important to maintain balanced SoCs of all cells in order to enhance the battery life; this is the cell balancing control problem. There have been many studies about the cell balancing control methods; the two main types include passive balancing methods and active balancing methods. Passive balancing methods utilize the resistors to dissipate excess energy of the high-voltage cells [10,11]. These approaches have simple control schemes and the cost is low. However, they To ensure that series-connected cells operate safely and to avoid events such as over discharging, overcharging, and explosion during operation, the electric energy of all cells in the pack must be equal. If a cell in the pack has lower SoC than other cells, it can be over-discharged, while the other cells in the pack still have energy. Consequently, that cell is damaged and may not be able to provide electrical energy to the load. Meanwhile, if a cell has higher SoC than other cells, it can be overcharged. A cell that is overcharged and over-discharged can explode, causing fire and/or damage to the device, as shown in Figure 2 [8]. The difference in SoC between cells connected in series is caused by many factors, such as manufacturing tolerances, different self-discharge rates, uneven operating temperature across the battery cells, and a non-uniform aging process [9]. In practical operations, it is important to maintain balanced SoCs of all cells in order to enhance the battery life; this is the cell balancing control problem. of the cell, and charging/discharging scenario [7]. Figure 1 shows the particular re ship between SoC and cell voltage at various temperatures. To ensure that series-connected cells operate safely and to avoid events such discharging, overcharging, and explosion during operation, the electric energy of a in the pack must be equal. If a cell in the pack has lower SoC than other cells, it over-discharged, while the other cells in the pack still have energy. Consequently, t is damaged and may not be able to provide electrical energy to the load. Meanwh cell has higher SoC than other cells, it can be overcharged. A cell that is overcharg over-discharged can explode, causing fire and/or damage to the device, as shown ure 2 [8]. The difference in SoC between cells connected in series is caused by ma tors, such as manufacturing tolerances, different self-discharge rates, uneven op temperature across the battery cells, and a non-uniform aging process [9]. In practi erations, it is important to maintain balanced SoCs of all cells in order to enhance t tery life; this is the cell balancing control problem. There have been many studies about the cell balancing control methods; t main types include passive balancing methods and active balancing methods. Passi ancing methods utilize the resistors to dissipate excess energy of the high-voltag  There have been many studies about the cell balancing control methods; the two main types include passive balancing methods and active balancing methods. Passive balancing methods utilize the resistors to dissipate excess energy of the high-voltage cells [10,11]. These approaches have simple control schemes and the cost is low. However, they have limitations such as very long balancing time, excessive heat, and low efficiency. Active cell balancing methods use capacitors and inductors, together with switching circuits, to transfer the electrical energy from cells with higher energy to those with lower energy. They do not cause electrical energy wastage, although the structure of the balancing circuit and control strategies are complex, especially for a large electrical storage system with many series-connected cells. There are several different circuit topologies and control methods, such as capacitor-based [12][13][14], inductor-based [15,16], and converter-based methods [17][18][19][20]. The circuit components and main characteristics of various active balancing methods are summarized in Table 1. In previous works, the equalization current was not controlled, thus surge current may occur in the output of the cell and the cell can be damaged. -Compares the reference current with cell current to control MOSFETs -Balancing time depends on the energy to be balanced, faster than capacitor-based balance -Needs more components -Surge current may occur Single inductors [16] 2n+2 MOSFETs, 2n+2 diodes, 1 inductor

Converter based
Cuk converter [17][18][19] 2n − 2 MOSFETs, 2n-2 inductors, n-1 capacitors -Compares the voltages of two adjacent cells to control MOSFETs -Balancing time depends on the energy to be balanced, faster than inductor-based balance -DC voltage source with 2n − 1 differences is needed to control MOSFETs -Surge current may occur Buck-boost converter [20] n MOSFETs, n diodes, n inductors Most of the previous methods used the voltage of cells or reference current to control the balancing circuits. The voltage balancing control scheme is easy to implement and low cost. However, since the relationship between the voltage and the energy level of the cell is nonlinear, energy balance between cells may not be fully balanced. Recently, some works used the SoC of cells to control energy levels of cells more effectively [9,21]. This approach performs better since SoC reflects more accurately the remaining energy in the cell. However, this method requires the estimation of the SoC of all cells since the SoC is not measured directly [22,23]. Some works [18,19,23] used a regression curve to estimate the SoCs of cells to reduce the computation burden. A load current and SoC co-estimation approach was proposed to mitigate the need for installing a current sensor in [24].
The Cuk bidirectional converter circuit is considered to be effective when applied to the cell-to-cell balancing method. However, to realize the Cuk converter for a cell balancing circuit, it is necessary to have a DC power with differential voltage levels to control the metal-oxide-semiconductor field effect transistors (MOSFETs). To overcome the abovementioned limitations, this paper proposes a modified Cuk converter-based cell balancing control method. In order to estimate the SoCs of the cells in the pack, the  [25] is adopted. The proposed control circuit model is developed and the optimal control problem is formulated. The formed optimal SoC balancing control problem for cells satisfies operational constraints such as the maximum allowed charging and discharging current of the cells, the maximum allowed equalizing current, and the lower and upper bounds of the cell SoC. To solve the optimal SoC balancing control problem, a sequential quadratic programming (SQP) algorithm is used. The optimal duty of the pulse width modulation (PWM) signals are determined and sent to the bidirectional Cuk converters to balance the SoC of cells in the pack.
The contributions of this study are as follows. First, a modified bidirectional Cuk converter is presented using only one MOSFET, one relay controlling the MOSFET for electrical energy transfer, and another relay controlling the cutoff of the bidirectional Cuk converter (when two adjacent cells have the same SoC levels) to avoid the loss of electrical energy via dissipation in the balancing circuits. Second, to improve the control speed of SoC balancing, we propose an algorithm to select an adaptive initial starting point at each control loop to enable quick reduction of the cost function when the optimal algorithm falls into the contour region. The remainder of this paper is organized as follows. In Section 2, the balancing circuit based on the modified bidirectional Cuk converter is proposed and a dynamic model of the SoC balancing control system is presented in Section 3. Section 4 presents the optimal SoC balancing control algorithm based on SQP. Section 5 describes the experimental results of the SoC balancing control. Finally, the conclusions are drawn in Section 6.

Conventional Bidirectional Cuk Converter-Based Circuit
The model of SoC balancing circuit based on conventional bidirectional Cuk converter i for two adjacent cells i and i + 1 is shown in Figure 3. L i1 and L i2 represent two inductors, C i is a capacitor, Q i1 and Q i2 are two MOSFETs, and d i1 and d i2 are two diodes of the MOSFETs. mal SoC balancing control problem for cells satisfies operational constraints maximum allowed charging and discharging current of the cells, the maxim equalizing current, and the lower and upper bounds of the cell SoC. To solve SoC balancing control problem, a sequential quadratic programming (SQP) used. The optimal duty of the pulse width modulation (PWM) signals are dete sent to the bidirectional Cuk converters to balance the SoC of cells in the pack The contributions of this study are as follows. First, a modified bidire converter is presented using only one MOSFET, one relay controlling the M electrical energy transfer, and another relay controlling the cutoff of the bidire converter (when two adjacent cells have the same SoC levels) to avoid the loss energy via dissipation in the balancing circuits. Second, to improve the cont SoC balancing, we propose an algorithm to select an adaptive initial starting p control loop to enable quick reduction of the cost function when the optim falls into the contour region. The remainder of this paper is organized as foll tion 2, the balancing circuit based on the modified bidirectional Cuk converter and a dynamic model of the SoC balancing control system is presented in Se tion 4 presents the optimal SoC balancing control algorithm based on SQP. S scribes the experimental results of the SoC balancing control. Finally, the con drawn in Section 6.

Conventional bidirectional Cuk converter-based circuit
The model of SoC balancing circuit based on conventional bidirection verter i for two adjacent cells i and i+1 is shown in Figure 3. and re inductors, is a capacitor, and are two MOSFETs, and and odes of the MOSFETs. The bidirectional Cuk converter transfers electrical energy from cell i to using the PWM signal applied to MOSFET . If is turned on, the elect stored in capacitor is transferred to cell i + 1, and inductor stores the e ergy from cell i. If is turned off, diode is forced to turn on. Cap charged by cell i, and the stored electrical energy in is transferred to cel larly, electrical energy is transferred from cell i + 1 to cell i by applying a PW . The frequency of the PWM signal is very high (10 kHz or higher), and he converter always operates in the discontinuous inductor current mode (DICM The bidirectional Cuk converter transfers electrical energy from cell i to cell i + 1 by using the PWM signal applied to MOSFET Q i1 . If Q i1 is turned on, the electrical energy stored in capacitor C i is transferred to cell i + 1, and inductor L i1 stores the electrical energy from cell i. If Q i1 is turned off, diode d i2 is forced to turn on. Capacitor C i is charged by cell i, and the stored electrical energy in L i2 is transferred to cell i + 1. Similarly, electrical energy is transferred from cell i + 1 to cell i by applying a PWM signal to Q i2 . The frequency of the PWM signal is very high (10 kHz or higher), and hence the Cuk converter always operates in the discontinuous inductor current mode (DICM) to reduce the switching loss of the two MOSFETs. The principle of the bidirectional Cuk converter is described in [26,27]. The duty cycle of the PWM signals is chosen as the control variable for SoC equalizing control.

Modified Bidirectional Cuk Converter-Based Circuit
The disadvantage of the original Cuk circuit when applied to the SoC balancing circuit is that it uses two MOSFETs to control the energy transfer in two directions. For the SoC balancing control of an n-cell LIB pack, an n − 1 balance circuit is required based on the conventional Cuk circuit. To open the MOSFETs in the n − 1 balance circuit, we require DC power with n differential voltage levels, hence resulting in an inconvenient circuit. However, practically, when the SoCs of all cells are in equilibrium, the n − 1 balance circuit would still be connected to the circuit; this would cause leakage current through the capacitors between the two cells, leading to damage and energy loss. In this study, to overcome the above disadvantages, the SoC balancing circuit is formed using only one MOSFET and a relay to control the energy transfer between two adjacent cells; another relay is used to cut off the SoC balancing circuit from the two cells when the two cells have the same SoC level. When the SoC is balanced, Relay 1 is opened, and the balance circuit separates from the two cells; hence, the loss of electrical energy to the balance circuit is zero when compared with the case in which the balance circuit is still connected between two cells. The SoC balancing circuit is driven by a microprocessor using the RS485 communication protocol. The modified Cuk converter-based SoC balancing circuit is depicted in Figure 4. the switching loss of the two MOSFETs. The principle of the bidirectional Cuk converter is described in [26,27]. The duty cycle of the PWM signals is chosen as the control variable for SoC equalizing control.

2 Modified bidirectional Cuk converter-based circuit
The disadvantage of the original Cuk circuit when applied to the SoC balancing circuit is that it uses two MOSFETs to control the energy transfer in two directions. For the SoC balancing control of an n-cell LIB pack, an n -1 balance circuit is required based on the conventional Cuk circuit. To open the MOSFETs in the n -1 balance circuit, we require DC power with n differential voltage levels, hence resulting in an inconvenient circuit However, practically, when the SoCs of all cells are in equilibrium, the n -1 balance circuit would still be connected to the circuit; this would cause leakage current through the capacitors between the two cells, leading to damage and energy loss. In this study, to overcome the above disadvantages, the SoC balancing circuit is formed using only one MOSFET and a relay to control the energy transfer between two adjacent cells; another relay is used to cut off the SoC balancing circuit from the two cells when the two cells have the same SoC level. When the SoC is balanced, Relay 1 is opened, and the balance circuit separates from the two cells; hence, the loss of electrical energy to the balance circuit is zero when compared with the case in which the balance circuit is still connected between two cells. The SoC balancing circuit is driven by a microprocessor using the RS485 communication protocol. The modified Cuk converter-based SoC balancing circuit is depicted in Figure 4.

Dynamic Model of the Proposed SoC Balancing Control System
Assuming there are n series-connected LIB cells, we have n -1 SoC balancing circuits , = 1, 2, ⋯ , − 1 for two adjacent cells (see Figure 5).

Dynamic Model of the Proposed SoC Balancing Control System
Assuming there are n series-connected LIB cells, we have n − 1 SoC balancing circuits CB j , j = 1, 2, · · · , n − 1 for two adjacent cells (see Figure 5).
Assuming that the current of cell i is and that the charge/discharge current of the n series-connected cells is , we have = + (3) Assume that the SoCs of the n cells in the pack at sampling time , = 0, 1, 2, ⋯ (Δ represents the sampling interval (Δ ≥ ), n is an integer, and is the period of PWM signal) are readily estimated by using an SoC estimation algorithm. The SoCs of the n cells at the next sampling time ( + 1)Δ can be calculated by integrating the ratio of the current of the cell to its nominal capacity over one sampling interval. Therefore, the SoC of cell i can be updated as From Figure 5, we see that each cell, except the first and last cells, participates in two SoC balancing circuits. Accordingly, the equalizing current of cell i, 1 < i < n is and the equalizing currents of cell 1 and cell n are I eq 1 = I L i1 ; I eq n = −I L n−1,2 Assuming that the current of cell i is I B i and that the charge/discharge current of the n series-connected cells is I s , we have Assume that the SoCs of the n cells in the pack at sampling time k∆T, k = 0, 1, 2, · · · (∆T represents the sampling interval (∆T ≥ nT s ), n is an integer, and T s is the period of PWM signal) are readily estimated by using an SoC estimation algorithm. The SoCs of the n cells at the next sampling time (k + 1)∆T can be calculated by integrating the ratio of the current of the cell to its nominal capacity over one sampling interval. Therefore, the SoC of cell i can be updated as where ∆SoC i (k) represents the SoC difference of cell i caused by receiving or transferring energy between two adjacent cells (cell i -1 and i + 1) and is calculated as where ∆SoC it (k) and ∆SoC ir (k) represent the changes in SoC of cell i, 1 ≤ i ≤ n, due to transferring and receiving energy, respectively. ∆SoC it (k) and ∆SoC ir (k) are calculated as For the first and last cells, ∆SoC 1t (k) = 0 and ∆SoC nr (k) = 0, respectively. ∆SoC s (k) represents the change in SoC caused by the current (charge/discharge) of n cells. As I s is the same for all cells in the pack, all cells have the same ∆SoC s (k) value as From the operation principle of a Cuk converter, currents I L i1 and I L i2 depend on the duty of the PWM signals applied to MOSFETs Q i1 and Q i2 and are generally calculated as where V B i , V B i+1 are voltages of the cell i and i + 1, respectively, and V C i is the voltage of capacitor C on the balancing circuit i. Using the following definitions: the change in SoCs for n cells can be formulated as: For cell 1: For cell i (1 < i < n): For cell n: Equations (11)-(13) describe the SoC change model of n series-connected cells; the SoCs of n cells depend on the duties of n − 1 SoC balancing circuits and the current of the cells. To model the relationship between the SoC of cells and the duties of PWM signals applied to SoC balancing circuits, we form the state, input, and output vectors as The system matrices are defined as where The vectors are formed as The dynamic of the SoC balancing system is generally expressed as (19) In (19), parts Q −1 B 1 (kT)f 1 (u 1 (k)) and Q −1 B 2 (kT)f 2 (u 2 (k)) represent the SoC changes due to transferred energy to the adjacent cells and SoC changes due to received energy from the adjacent cells, respectively. The SoC of a cell at the next time will be equal to the SoC at the present time plus the changes in SoC received from the adjacent cells minus the changes in SoC transferred to the adjacent cells and the changes in SoC increased/decreased by charging/discharging. The dynamics of the SoC balancing system are nonlinear.
From model (19), we see that by using the inputs u 1 (k) and u 2 (k), the process of transferring and receiving energy for each cell in the pack can be controlled to obtain the desired SoC of cells at the next sampling time.
The current through the cells is limited by the cell performance; it is the sum of the equalizing current and charge/discharge current; therefore, the SoC balance circuit design must ensure that the current of cells is maintained within an appropriate range. The limits of the equalizing currents and inputs u 1 (k) and u 2 (k) must be considered in the SoC balancing control problem. Model (19) describes the relationship between the SoC of cells at sampling time k + 1 and SoC of cells at sampling time k, estimated by the SoC estimation algorithm. The SoC of cells at sampling time k + 1 is only used to calculate the control signals u 1 (k) and u 2 (k) at sampling time k; it is not used for calculating the control signals at sampling time k + 1.

Establishing the Optimal SoC Balancing Control Problem
The optimal SoC balancing control for LIB cells is realized to maintain the SoC of the n series-connected cells in the pack at an approximate SoC level; the SoC differences of the cells should be maintained within the allowed range.
The goal of optimal SoC balancing is to equalize the SoC of the cells such that the difference between the SoC of each cell and average SoC is minimized, as shown by the following equation: where M SoC denotes the average SoC of cells and is defined as To maintain the normal operating conditions of SoC balancing circuits, the currents of the inductors should not be high; otherwise, the cells can be damaged. A goal related to currents of the inductors is added to the optimal SoC balancing problem, as follows: The constraints of the optimal SoC balancing problem are formulated by the following equations.
First, the SoC of cells should be maintained within the following range: where SoC min and SoC max represent the lower and upper bounds of the SoC of cells, respectively. Second, the Cuk converter is designed to operate in DICM; therefore, the equalizing current is not allowed to exceed the maximum equalizing current. The duty of the PWM control signal applied to the MOSFET satisfies the following constraints: (24) where D max represents the upper bound of duty. Third, the current of cells satisfies the following operating range: where I B cmax and I B dmax represent the upper bounds of charge and discharge currents, respectively. The sign of the charge current is negative, while that of the discharge current is positive. Generally, the optimal SoC balancing control problem is to calculate the duties applied to the n -1 SoC balancing circuits so as to minimize the difference between the SoC of each cell and the average SoC (21) and realize the goal related to the currents of the inductors (22) subject to constraints (23)- (25). The cost function is established as where p i > 0 and q j > 0, i = 1, 2, . . . , n, j = 1, 2, . . . , n -1 represent weights of the cost function. Cost function (26) can be rewritten in the quadratic form as where I n×1 is a n by 1 matrix with all its elements being 1. The weight matrices P and Q are defined as The control signals u 1 (k) and u 2 (k) applied to the n -1 SoC balancing circuits are the solutions of the optimal control problem minJ(SoC(k), u 1 (k), u 2 (k)), with the dynamics of the SoC balancing system at the next sampling time described as (29) Energies 2021, 14, 2875 10 of 18 subject to the following constraints: SoC min I n−1,1 < SoC(k + 1) < SoC max I n−1,1 (31) with I min = I B cmax · · · I B cmax T ∈ R n , I max = I B dmax · · · I B dmax T ∈ R n , and SoC(k) representing the estimated SoC of cells at sampling time k.

Solving the Optimal SoC Balancing Control Problem Using SQP
To solve the optimal SoC balancing control problem (26) with constraints (30)-(33) to determine the n − 1 optimal duty solutions applied to the n − 1 SoC balancing circuits, the SQP method is used in this study. The SQP method is the expansion of the QP method to determine the global solution of the optimal problem with a nonlinear cost function and nonlinear inequality constraints. To implement the QP algorithm, the Lagrange multiplier is chosen first, following which the Kuhn-Tucker theorem and Karush-Kuhn-Tucker (KKT) theorem are used to convert the nonlinear inequality constraints to equality ones. The QP algorithm is established by using the KKT based on an active set. Finally, the QP algorithm is applied to the nonlinear optimal problem [28][29][30]. This SQP is coded in MATLAB script and then embedded in LabVIEW to control online optimal SoC balancing.

Selection of the Initial Points for the Optimal Problem-Solving Process
The initial points for the optimal problem-solving process play a key role in the optimal solution searching, which needs to be finished in one control cycle. Based on the SoCs of cells, the initial points of duties can be chosen subject to the constraints. We proposed an algorithm to adaptively determine the initial points of duties as follows.

Experimental Setup and Scenarios
The experimental system is shown in Figure 6. The Samsung LIB pack includes seven series-connected cells. To estimate the SoC of cells and calculate the dynamics of the SoC balancing system (19), a second-order equivalent circuit model was used. The parameters of the cell model used in the experiment were determined based on the least squares method by using the particular charge/discharge scenarios [17]. Energies 2021, 14, 2875 11 o . Figure 6. Experimental system.
The algorithm flowchart of SoC estimation and optimal SoC balancing control is shown in Figure 7. The initial SoCs of the cells are presented in Table 3. The algorithm to estimate SoC of cells in the pack is presented in our previous work [25], in which the SoC of cell is estimated by using two sigma-point Kalman filters based on the second-or equivalent circuit model. Table 3. Initial SoCs of the cells. A measurement module was created with seven voltage difference measurement circuits, one current measurement circuit, and one temperature sensor. The voltage difference signals were first converted into single-end signals and then converted into 10-bit digital signals and transferred to a personal computer (PC) via RS485. The PC implemented the SoC estimation program for the cells, and the configuration of the PC was Core(TM) i3-6100 CPU@3.70GHZ with 4 cores and 16 GB RAM. MATLAB software was used to implement the sigma-point Kalman filter algorithm and the optimal SoC balancing control algorithm. LabVIEW 2018 was used to create the graphic user interface; the MATLAB software was embedded in LabVIEW to run the algorithms. The load was a YONG-CHIDA-id67 240 W, 24 V, 10 A BLDC motor with a maximum speed of 295 rpm. The power supply used was 195 W Owon ODP 3032 (36 V, maximum current: 6 A) with two programmable channels. The physical parameters of the SoC balancing circuit are summarized in Table 2. The SoC estimation algorithm and optimal SoC balancing control algorithm were coded in MATLAB script and then embedded in the LabVIEW environment to estimate and display the SoC of cells, current, and voltages of cells in real time. The sampling time interval was set to 10 s.

Cell 1 Cell 2 Cell 3 Cell 4 Cell 5 Cell 6 Cell
The algorithm flowchart of SoC estimation and optimal SoC balancing control is shown in Figure 7.
The initial SoCs of the cells are presented in Table 3. The algorithm to estimate the SoC of cells in the pack is presented in our previous work [25], in which the SoC of the cell is estimated by using two sigma-point Kalman filters based on the second-order equivalent circuit model.
To verify the structure of the modified SoC balancing circuit and cell balancing control algorithm, test scenarios with no charging/discharging, with discharging at 0.3 A, and with alternate charging and discharging, respectively, were implemented. The algorithm flowchart of SoC estimation and optimal SoC balancing control is shown in Figure   Figure 7. Algorithmic flowchart of SoC estimation and optimal SoC balancing contro The initial SoCs of the cells are presented in Table 3. The algorithm to SoC of cells in the pack is presented in our previous work [25], in which th cell is estimated by using two sigma-point Kalman filters based on the s equivalent circuit model. Table 3. Initial SoCs of the cells.  Figure 8 shows the experiment results for the first scenario. As shown in Figure 8c, energy is transferred from cell 1 to cell 2 and cell 3 to cell 4, respectively, during the entire SoC balancing process. The magnitude of balancing current was initially maximum and decreased gradually at the end of the process. Energy transfer from cell 2 to cell 3 begins at 400 s when the SoC of cell 2 exceeds the SoC of cell 3. Cell 4 transfers energy to cell 5 from 750 s with a small balancing current. Cell 6 transfers energy to cell 5 between 602 and 1090 s with maximum balancing current magnitude, then cell 5 transfers energy to cell 6 with a smaller balancing current. Cell 7 transfers energy to cell 6 during the first 1031 s then cell 6 transfers energy to cell 7 with a smaller balancing current. In summary, the magnitude of balancing current is controlled according to the difference in SoC values of the two adjacent cells, which can improve the cell balancing performance.

Scenario 1: No Charging/Discharging
As shown in Figure 8a, the SoC values of the seven cells gradually converged to 60%, which is the average of the initial SoC values. SoC balancing took approximately 2218 s, during which the cost function decreased from 2767 to 24 (see Figure 8b left). The iteration number at each control time interval is shown in Figure 8b (right). magnitude of balancing current is controlled according to the difference in SoC va the two adjacent cells, which can improve the cell balancing performance.
As shown in Figure 8a, the SoC values of the seven cells gradually converged t which is the average of the initial SoC values. SoC balancing took approximately during which the cost function decreased from 2767 to 24 (see Figure 8b left). The ite number at each control time interval is shown in Figure 8b

Scenario 2:
Discharging with I s = 0.3A Figure 9 shows the experimental results for the test scenario of discharging with I s = 0.3 A. The SoC values of cells 2, 4, and 6 initially increased, although the cells were discharging. This is because these cells had lower initial SoC values than the adjacent cells and thus received energy to balance their SoCs. The SoCs of all the cells reached the equilibrium in 3200 s, which was longer than the time taken in the first case in which no charging/discharging occurred. It can be seen from Figure 9c that the total duration for which the balancing current between cells is its maximum value is much smaller than in scenario 1. This is because the magnitude of the balancing current is controlled according to the charge/discharge current; the larger the discharge/charge current, the smaller the balancing current across the cell. groups of cells with nearly equal SoC value. For example, at 1400 s, the SoC values 4, 5, and 6 are almost the same at 37%, thus the iteration number exceeds 30. At 91 and 2316 s, the cost function did not decrease, although the SoC values of the ce considerably different. In such cases, the proposed initial point selection algorith applied, and the SoC was successfully balanced.   Another finding from Figure 9b is that the number of iterations increases if there are groups of cells with nearly equal SoC value. For example, at 1400 s, the SoC values of cells 4, 5, and 6 are almost the same at 37%, thus the iteration number exceeds 30. At 915, 1925, and 2316 s, the cost function did not decrease, although the SoC values of the cells were considerably different. In such cases, the proposed initial point selection algorithm was applied, and the SoC was successfully balanced. Figure 10 shows the experimental results for the case in which charging and discharging alternately occur. The cells are discharged with I s = 0.5 A during the first 1000 s, then charged with I s = −0.3 A between 1000 and 2000 s, and then discharged again with I s = 0.3 A. The SoC balancing was finished after 3700 s. In this case, the proposed initial point selection algorithm was applied twice. The result shows that the proposed method can achieve good SoC balancing in a practical environment in which the battery is repeatedly charged and discharged. Figure 10 shows the experimental results for the case in which charging and discharg ing alternately occur. The cells are discharged with = 0.5 A during the first 1000 s, the charged with = −0.3 A between 1000 and 2000 s, and then discharged again with = 0.3 A. The SoC balancing was finished after 3700 s. In this case, the proposed initial poin selection algorithm was applied twice. The result shows that the proposed method ca achieve good SoC balancing in a practical environment in which the battery is repeatedl charged and discharged.

Verification of initial set point selection algorithm
Comparative analysis was performed to verify the advantages of the initial set poin selection algorithm. Figure 11 presents the cost function J with and without applying th proposed algorithm for the same experiment scenario. As can be seen from the blue line the cost function remained almost constant at 247 between 1056 and 2006 s. In other word the control algorithm fell into local minimum. The balancing process was finished afte

Verification of Initial Set Point Selection Algorithm
Comparative analysis was performed to verify the advantages of the initial set point selection algorithm. Figure 11 presents the cost function J with and without applying the proposed algorithm for the same experiment scenario. As can be seen from the blue line, the cost function remained almost constant at 247 between 1056 and 2006 s. In other words, the control algorithm fell into local minimum. The balancing process was finished after 2350 s. When the proposed algorithm was applied, the initial points of duties were adaptively adjusted and the cost function quickly began to decrease again. In this case, the balancing process took only 1600 s, which is 32% shorter than the case without the algorithm. Therefore, it is confirmed that the adaptive initial set point selection algorithm can actually improve the performance of the SoC balancing control method.
Energies 2021, 14,2875 15 o 2350 s. When the proposed algorithm was applied, the initial points of duties were ad tively adjusted and the cost function quickly began to decrease again. In this case, balancing process took only 1600 s, which is 32% shorter than the case without the al rithm. Therefore, it is confirmed that the adaptive initial set point selection algorithm actually improve the performance of the SoC balancing control method. Figure 11. The cost function comparison of with and without the initial point selection algorithm

Conclusions
An optimal SoC balancing control method for series-connected LIB cells was p sented. A modified Cuk converter-based SoC balancing circuit was proposed, where o MOSFET and two relays were used instead of two MOSFETs in the conventional C converter. The dynamic model of the proposed SoC balancing control system was form lated and the solution method by using the SQP method was presented. In order to prove the performance of the balancing control algorithm, an adaptive initial set po selection method was also proposed. The optimal SoC balancing control and SoC estim tion algorithms were coded in MATLAB and embedded in LabVIEW to control the S balancing in real time. Experimental tests with a Samsung LIB pack consisting of sev series-connected cells were conducted in three different charge/discharge scenarios. In first scenario without charge/discharge, SoCs of seven cells could be balanced after 2 s. In the other two scenarios with continuous discharging and alternate charging and d charging, SoC balancing was successfully achieved although it took more time than in first scenario. Moreover, analysis of the calculated duty cycles confirmed that the mag tude of the balancing current was properly controlled according to the difference in So of the adjacent cells and the charge/discharge current. Finally, it was confirmed that proposed initial set point selection algorithm could improve the speed of the SoC bala ing process.

Conclusions
An optimal SoC balancing control method for series-connected LIB cells was presented. A modified Cuk converter-based SoC balancing circuit was proposed, where one MOSFET and two relays were used instead of two MOSFETs in the conventional Cuk converter. The dynamic model of the proposed SoC balancing control system was formulated and the solution method by using the SQP method was presented. In order to improve the performance of the balancing control algorithm, an adaptive initial set point selection method was also proposed. The optimal SoC balancing control and SoC estimation algorithms were coded in MATLAB and embedded in LabVIEW to control the SoC balancing in real time. Experimental tests with a Samsung LIB pack consisting of seven series-connected cells were conducted in three different charge/discharge scenarios. In the first scenario without charge/discharge, SoCs of seven cells could be balanced after 2200 s. In the other two scenarios with continuous discharging and alternate charging and discharging, SoC balancing was successfully achieved although it took more time than in the first scenario. Moreover, analysis of the calculated duty cycles confirmed that the magnitude of the balancing current was properly controlled according to the difference in SoCs of the adjacent cells and the charge/discharge current. Finally, it was confirmed that the proposed initial set point selection algorithm could improve the speed of the SoC balancing process.
Author Contributions: C.N.V. was originally responsible for the conceptualization, methodology, and simulation and prepared the original draft of the article. T.N.V., M.-D.N. verified the simulation data, data curation, investigation, and draft writing. S.-J.A. performed a formal analysis of review, editing, and supervision. All authors have read and agreed to the published version of the manuscript.

Data Availability Statement:
The data used to support this study are available from the corresponding author upon request.