A Path Planning Strategy with Ant Colony Algorithm for Series Connected Batteries

: This article presents a path planning strategy with ant colony algorithm for series connected batteries. The motive of this paper is the increasing need for efficient and fast equalization for Lithium-ion batteries. There are many great papers on the design of the equalization circuits. However, they lack the part of path planning strategy for the balancing circuits. To solve this issue, we adopt the graph model to represent the balancing paths among di ﬀ erent battery cells and then construct two optimal models based on the best e ﬃ ciency and speed, respectively. Finally, ant colony algorithm is used to solve these two models. This makes it possible to achieve di ﬀ erent goals according to the practical operating conditions. We validate the function of the proposed path planning strategy through an example of 13 series connected battery balancing system.


Introduction
To provide adequate/sufficient power rate for the systems such as uninterruptible power supply, electric vehicles, etc., the power cells are usually used in series connection. Lithium-ion battery is a good choice for its high power and energy density, high cell voltage, low self-discharge rate, no memory effect, and being environmentally friendly [1][2][3][4][5]. The imbalance of the voltages among the battery cells are caused by many reasons, such as the difference in the charge-discharge stage and the internal impedance. Consequently, the whole capacity of the battery pack is shortened by the imbalance, and even damaged. It is of significance to equip a balancing equalizer or system to the battery packs [6][7][8].
The affected factors of the balancing system performance is decided by the optimal strategy when the balancing circuit structure and variables are fixed. Currently, there are many intelligent algorithms that can be used for path planning; for instance, the neural network algorithm, grid calculus, artificial potential field algorithm, and genetic algorithm, etc. [9][10][11][12]. The neural network algorithm does well in self-learning at the expense of large-scale network structure, and the grid calculus is good at real-time control at the cost of lacking global information and being trapped in local optima [13,14]. Moreover, its neuron threshold changes with time in multiple obstacles and dynamic environments. Genetic algorithm has good global search ability at the cost of very large searching space, and also the model must be continuously re-established with the changes of the environment. The grid pattern can clarify the best path, but the mesh density and environment have an effect on its efficiency.
The ant colony optimization algorithm is developed by Doctor Dorigo, which is an intelligent search algorithm by long-term tracking the behavior of the ant colony. It is a probabilistic algorithm A two-layer equalization-system structure is proposed to step up the balancing speed and reduce systematic complexity as shown in Figure 1. The battery packs composed by many cell units in this paper are power cells and each cell unit consists of many battery cells. The battery cell can achieve direct equalization through the bottom equalizer and the cell unit can achieve direct equalization through the up equalizer. There is a need to balance more than two battery cells simultaneously to acquire faster balancing rate and higher efficiency when imbalanced situations are complex. Therefore, it is quite necessary to find a path planning strategy based on optimal algorithm to increase the balancing rate and reduce the energy loss.  In order to analyze and design easily, we make the following assumptions in the systematic mode [25][26][27].
(1) All the switches are considered identical including the parasitic parameters and energy loss coefficient.
Electronics 2020, 9,1816 3 of 13 (2) Equalizers of the same type have identical energy loss coefficient while they differ of different types.
A flying inductor structure is adopted by the bottom equalizer where the switches Q k,i are the low on-conduction loss bi-directional switches as shown in Figure 2. The energy can be directly transferred from the source battery to the target one through the common inductor. A multi-winding transformer structure is adopted by the top equalizer as shown in Figure 3, which can guarantee the direct energy transformation between any two cell units.

Graph Model for Two-Layer Balancing System
The main circuit elements are needed to be defined such as the batteries, switches, energy storage elements, etc., in Figure 1 to obtain the digraph of the two-layer balancing system.
is a graph with a set of N nodes, E directed edges and ordered pairs of different nodes. (2) Target node is the terminal node of the energy flow path. It can be either the start point or the end point of the energy flow path. In the balancing system, the energy storage units are defined as the target nodes such as the batteries or the supercapacitors. (3) Intermediate node is the node that stores energy temporarily which corresponds to the energy storage element in the equalizer like a capacitor, inductor or transformer. There is a coefficient η stored in conversion matrix, which represents the energy conversion efficiency for each intermediate node. It is considered identical of the same type. (4) The graph can be represented as an n × m matrix through the adjacency matrix where the nodes in the digraph constitute the row and the edges compose the line. There are only two non-zero elements in the row corresponding to arc (i, j) where it is −1 corresponding to the row of node i and it is 1 corresponding to the line of node j. (5) The real-valued function f (i, j) represents the net flow in the arc (i, j). It can be considered as the number of a commodity, which can be positive or negative. It is worth noting that the net flow in arcs needs to obey the conservation law at each node. As for the intermediate node, the total net flow into the node should be equal to that out of the node without considering the loss during the conversion process. When it comes to the target node, the source battery has more outflow and the target one has more inflow.
The matchup between the balancing system and its digraph model is shown in Table 1. Figure 4 is the updated Figure considering the above corresponding relation where the circuit elements are replaced by the nodes and edges. Each equalizer which is represented by a dotted cycle consists of one intermediate node and k target nodes. Each target node is connected to one intermediate node and two edges. There are k × m − m + 1 target nodes, m + 1 intermediate nodes and m × (k + 1) edges when the number of the bottom equalizers is m. We take a 13 series connected battery pack, which is divided into four groups with four batteries in each group for example. It can be obtained that there

Graph Model for Two-Layer Balancing System
The main circuit elements are needed to be defined such as the batteries, switches, energy storage elements, etc., in Figure 1 to obtain the digraph of the two-layer balancing system.
(1) Digraph G = (N, E) is a graph with a set of N nodes, E directed edges and ordered pairs of different nodes. (2) Target node is the terminal node of the energy flow path. It can be either the start point or the end point of the energy flow path. In the balancing system, the energy storage units are defined as the target nodes such as the batteries or the supercapacitors. (3) Intermediate node is the node that stores energy temporarily which corresponds to the energy storage element in the equalizer like a capacitor, inductor or transformer. There is a coefficient η stored in conversion matrix, which represents the energy conversion efficiency for each intermediate node. It is considered identical of the same type. arcs needs to obey the conservation law at each node. As for the intermediate node, the total net flow into the node should be equal to that out of the node without considering the loss during the conversion process. When it comes to the target node, the source battery has more outflow and the target one has more inflow.
The matchup between the balancing system and its digraph model is shown in Table 1. Figure 4 is the updated Figure considering the above corresponding relation where the circuit elements are replaced by the nodes and edges. Each equalizer which is represented by a dotted cycle consists of one intermediate node and k target nodes. Each target node is connected to one intermediate node and two edges. There are k × m − m + 1 target nodes, m + 1 intermediate nodes and m × (k + 1) edges when the number of the bottom equalizers is m. We take a 13 series connected battery pack, which is divided into four groups with four batteries in each group for example. It can be obtained that there are 13 target nodes, 5 intermediate nodes and 56 edges in the digraph model. It can also be found that the transmission path of any two target nodes must go through at least one intermediate node.
Each type of intermediate nodes has a unique power conversion factor which is stored in the conversion coefficient matrix, and each edge has a value which is stored in the incidence matrix representing the connection status of the nodes and edges. The initial value in the incidence matrix can be got according to the connectivity. It is 1 with direct connection, otherwise it is 0.

Balancing Rules
When imbalance that is quantized by the instantaneous maximum voltage difference of the battery pack is detected, the balancing system starts to respond. That is [28][29][30], where ij v is the eigenvalue of the jth battery in the ith group and it can be represented by VOC which is either the voltage or the state of charge (SOC). ij v can be obtained by real-time measurement in the actual balancing system and pre-determined in the following simulation. ( ) t Δ reveals the maximum absolute difference between the amplitude of each battery cell and the mean value of the battery pack The balancing process starts when the measured maximum absolute difference ( ) t Δ is more than the given threshold T H C . The equalization can be achieved through over-equalization and hysteresis control strategy. That is, the balancing process is stopped when the maximum absolute difference is lower than δ, otherwise, the above balancing process is repeated until the VOC is within the accuracy range. The balancing system acts according to the principle of Figure 5.
According to the experimental results of the literatures, it shows the self-recovery characteristics of lithium batteries. It can be concluded that there are some errors between the open circuit voltage and the actual characteristics. The over-equalization strategy is adopted to avoid the waiting time to speed up the equalization rate and the hysteresis control can also improve the reliability of control.

Balancing Rules
When imbalance that is quantized by the instantaneous maximum voltage difference of the battery pack is detected, the balancing system starts to respond. That is [28][29][30], where v ij is the eigenvalue of the j th battery in the i th group and it can be represented by VOC which is either the voltage or the state of charge (SOC). v ij can be obtained by real-time measurement in the actual balancing system and pre-determined in the following simulation. ∆(t) reveals the maximum absolute difference between the amplitude of each battery cell and the mean value of the battery pack. The balancing process starts when the measured maximum absolute difference ∆(t) is more than the given threshold C TH . The equalization can be achieved through over-equalization and hysteresis control strategy. That is, the balancing process is stopped when the maximum absolute difference is lower than δ, otherwise, the above balancing process is repeated until the VOC is within the accuracy range. The balancing system acts according to the principle of Figure 5. than the given threshold T H C . The equalization can be achieved through over-equalization and hysteresis control strategy. That is, the balancing process is stopped when the maximum absolute difference is lower than δ, otherwise, the above balancing process is repeated until the VOC is within the accuracy range. The balancing system acts according to the principle of Figure 5.
According to the experimental results of the literatures, it shows the self-recovery characteristics of lithium batteries. It can be concluded that there are some errors between the open circuit voltage and the actual characteristics. The over-equalization strategy is adopted to avoid the waiting time to speed up the equalization rate and the hysteresis control can also improve the reliability of control.

Best Balancing Efficiency Model
The balancing problem can be interpreted as a path planning problem where the optimal object is determined by the actual condition either maximum balancing efficiency or minimum balancing time. According to the experimental results of the literatures, it shows the self-recovery characteristics of lithium batteries. It can be concluded that there are some errors between the open circuit voltage and the actual characteristics. The over-equalization strategy is adopted to avoid the waiting time to speed up the equalization rate and the hysteresis control can also improve the reliability of control.

Best Balancing Efficiency Model
The balancing problem can be interpreted as a path planning problem where the optimal object is determined by the actual condition either maximum balancing efficiency or minimum balancing time.
It is expected to get best efficiency when the battery pack is idle and then the balancing problem can be interpreted as a constrained optimization problem to improve the balancing efficiency as much as possible. In this way, it can be equivalent to a shortest path problem in order to plan an energy transfer path resulting in least energy conversion times and number of switching.
The balancing efficiency can be defined as [31]: The total loss of the balancing process is defined as the energy loss during transferring consisting of energy loss during conversion and switching loss. The energy reduction in the source battery is equal to the energy difference of the target battery before and after equalization.
To implement the algorithm successfully, the total equalization efficiency is expressed through each efficiency of the balancing path denoted as effp. The effp can be signified by the lumped balancing efficiency each time as effc.
where e f f p i is the balancing efficiency of the i th balancing path and m represents the conversion times. Then, the total efficiency during balancing process is where f ai is the power flow of the ith balancing path. To achieve the best equalization efficiency, the balancing cost is defined according to the energy loss during balancing process. The cost function can be defined as [31].
Cost function: Restrictions: Electronics 2020, 9, 1816 6 of 13 Intermediate node: where v o is the VOC after equalization, v oavg is the average VOC of the battery pack. v is and v id are the VOC of the start and destination node of the i th balancing path, respectively, in which the energy flow converts m times. ε is the VOC loss and f a is the energy flow of each edge. I p are a set of edges that flow into node p while O p is a set of edges that flow out node p. µ is power conversion index of the intermediate node.

Best Balancing Speed Model
When a serious imbalanced situation occurs in the series battery pack, it is required that the balancing system can respond quickly to improve the performance of the battery pack. Therefore, it needs to be quickly balanced to shorten the balancing time so as to prevent the battery from overcharging or undercharging.
According to the law of electric charge conservation, the balancing time can be expressed as where Q is the charge variation, I o is the average balancing current, C is the capacity of the battery, P o is the output power, SOC is the variation of the state of charge, V is the voltage differences of the batteries, K is the relevant coefficient between the state of charge (SOC) variation and voltage variation, V B is the voltage of the battery. When equalization is prioritized with the fastest balancing speed, the cost function for the optimization problem is where n is the energy conversion times.

Definitions of Some Matrices
The proposed algorithm needs to measure the characteristic parameters of the batteries and judge their state to balance the circuit in time. To record the state of the balancing system and indicate the changes in the system topology, some definitions are made: (1) Demand matrix (D): It is a row vector that contains the VOC difference.

Principal Sequences
The specific implementation of the algorithm in MATLAB is as follows: (1) Definitions of digraph matrices: the node-edge adjacency matrix and demand matrix are defined and initialized according to the status of the equalizer. (2) Imbalanced status detection: it is of great significance to estimate the batteries' state according to their VOCs. Once one or more imbalanced nodes are detected, update the demand matrix D according to the calculated power of each node. The demand matrix D is assigned a negative value if the battery cell is overcharging, that is, its VOC is higher than others'. Otherwise, D is assigned a positive value. The specific implementation process of the balancing algorithm is shown in Table 2. Table 2. Specific implementation process of the balancing algorithm.
Steps Items 1 Define of digraph matrices 2 Define of nodes and edges 3 Detect the imbalanced statusIf yes, obtain the Demand matrix D, Edge state matrix Y s and Unit priority matrix L p , and then calculate the optimal solution according to Equations (6) and (7) Else, go back to step 3 4 Output matrices related to edges 5 Update the Edge status matrix Y s

Solving Steps with ant Colony Algorithm
When using the ant colony algorithm to solve the path planning problem, the problem is usually equivalent to a graph G = (C, L). The node set C is given by the battery group and its position in the problem description. The connection edge set L is the complete connection between the nodes. In general, the process of balancing from the source cell to the target one can be described as a process in which ants are guided by pheromone and local heuristic information and crawl on the graph. When ants crawl, they must also comply with certain restrictions to ensure that they have a feasible solution.
In the ant colony algorithm model, the total number of ants is m and the ant individual is k, then k = 1, 2, . . . , m. The number of batteries in series connection is n. It is necessary to sort the n batteries from 1 to n when artificial ants build a feasible path. The probability of each node being selected is determined according to a given probability selection formula and the nodes with the transmission values are selected according to a certain rule. The probability of accessing node j can be calculated for the ant k in the node i according to Equation (8). In order to prevent the ants from walking away from the locations of the batteries that have already been passed, a taboo tabulation table tabu k is defined to Electronics 2020, 9, 1816 8 of 13 record whether the k th ant has passed a certain battery location. The records in the table tabu k change depending on the ants' selection [32][33][34].
where P k i, j (t)-the probability of the ant k moves from the battery position i to j at time t; τ i, j (t)-the pheromone concentration of ant k moves from battery position i to j at time t; it is in the range of [τ min ,τ max ]; at time 0, the pheromone is the same with τ max .
After each ant builds a complete solution, the pheromone path is updated based on the pheromone update equation. Then, the pheromone performing best in the current iteration is enhanced. Usually, the pheromone is updated according to Formula (10) where ρ is the local pheromone volatilization coefficient and each path has the same volatility rules; it is usually in the range of ρ ⊂ [0, 1); ∆τ ij best (t) The pheromone released by ant k on path (i, j), and it is defined as where ϕ best is the optimal solution in the cycle. The flow chart is shown in Figure 6.
where best ϕ is the optimal solution in the cycle. The flow chart is shown in Figure 6.

Analysis of Balancing Path Planning for 13 Series Connected Batteries
The graph model of the balancing system with a two-layer structure is shown in Figure 4.

Analysis of Balancing Path Planning for 13 Series Connected Batteries
The graph model of the balancing system with a two-layer structure is shown in Figure 4. Suppose n = 4 and m = 4, then the bottom cell direct equalizer can achieve direct equalization of 4 cells. The top cell direct equalizer can achieve direct equalization of 4 units.
Set: the bottom equalizer efficiency to 0.9 the average balancing current to 0.8 A the top equalizer efficiency to 0.85 the average balancing current to 1.2 A, the maximum battery cell voltage to 3.6 V the minimum battery cell voltage to 2.5 V the maximum allowable voltage error between the cells to 0.1 V, that is, the threshold V TH = 0.05 V. Figure 7 is the battery samples, where the blue bar represents the voltage of each cell, the black dashed line represents the average voltage of the 13 batteries, and the two red solid lines represent the upper and lower limits of the battery voltage. There is no need to start the equalization for the cells within the solid red line range. It can be seen that the average voltage of 13 series battery pack is 3.15 V, and the voltages of seven batteries are higher than the upper limit which are called rich-energy cells. The voltages of five batteries are lower than the lower limit which are called loss-energy cells. The maximum voltage difference between the cells before equalization is 0.72 V which is greater than 0.1 V, and it is necessary to start equalization.
Electronics 2020, 9, x FOR PEER REVIEW 10 of 14 the maximum allowable voltage error between the cells to 0.1 V, that is, the threshold VTH = 0.05 V. Figure 7 is the battery samples, where the blue bar represents the voltage of each cell, the black dashed line represents the average voltage of the 13 batteries, and the two red solid lines represent the upper and lower limits of the battery voltage. There is no need to start the equalization for the cells within the solid red line range. It can be seen that the average voltage of 13 series battery pack is 3.15 V, and the voltages of seven batteries are higher than the upper limit which are called richenergy cells. The voltages of five batteries are lower than the lower limit which are called loss-energy cells. The maximum voltage difference between the cells before equalization is 0.72 V which is greater than 0.1 V, and it is necessary to start equalization. If a simple equalization strategy is adopted, that is, the energy transferred between the cell with highest voltage and that with the lowest voltage. The voltages of the battery samples before and after equalization are shown in Figure 8. It can be seen that the maximum voltage difference between the cells after equalization is within 0.1 V, and the loss equivalent of the entire balancing process is 0.3941. The balancing time is about 42,400 s. Then, we do the simulations for the best efficiency of the balancing system, that is, the least If a simple equalization strategy is adopted, that is, the energy transferred between the cell with highest voltage and that with the lowest voltage. The voltages of the battery samples before and after equalization are shown in Figure 8. It can be seen that the maximum voltage difference between the cells after equalization is within 0.1 V, and the loss equivalent of the entire balancing process is 0.3941. The balancing time is about 42,400 s.
Then, we do the simulations for the best efficiency of the balancing system, that is, the least energy loss during the balancing process. The optimal balancing path planning scheme is shown in Figure 9, in which the horizontal and vertical coordinates represent the position coordinates of the batteries, and the blue hollow circles represent the battery cells. The batteries are numbered from left to right, 1 to 13, respectively. The yellow numbers in the hollow circles indicate the target cell. For instance, the number 1 battery position has a yellow number 3, which indicates that the number 1 battery discharge to number 3 battery through the transition node, and others are the same. It can be seen that in the best efficiency strategy, all the balancing paths are within the bottom equalizer. In this way, the energy transmission is direct, the number of energy conversion times is small, the energy consumption of the balancing process is little, and therefore the balancing efficiency is high. The battery voltages before and after equalization are shown in Figure 10. After equalization, the maximum voltage difference between the batteries is within 0.1 V, satisfying the constraint conditions. The simulation results show that the loss equivalent of the whole balancing process is 0.2305 after the optimization and the balancing time is 20,100 s. If a simple equalization strategy is adopted, that is, the energy transferred between the cell with highest voltage and that with the lowest voltage. The voltages of the battery samples before and after equalization are shown in Figure 8. It can be seen that the maximum voltage difference between the cells after equalization is within 0.1 V, and the loss equivalent of the entire balancing process is 0.3941. The balancing time is about 42,400 s. Then, we do the simulations for the best efficiency of the balancing system, that is, the least energy loss during the balancing process. The optimal balancing path planning scheme is shown in Figure 9, in which the horizontal and vertical coordinates represent the position coordinates of the batteries, and the blue hollow circles represent the battery cells. The batteries are numbered from left to right, 1 to 13, respectively. The yellow numbers in the hollow circles indicate the target cell. For instance, the number 1 battery position has a yellow number 3, which indicates that the number 1 battery discharge to number 3 battery through the transition node, and others are the same. It can be seen that in the best efficiency strategy, all the balancing paths are within the bottom equalizer. In this way, the energy transmission is direct, the number of energy conversion times is small, the energy consumption of the balancing process is little, and therefore the balancing efficiency is high. The battery voltages before and after equalization are shown in Figure 10. After equalization, the maximum voltage difference between the batteries is within 0.1 V, satisfying the constraint conditions. The simulation results show that the loss equivalent of the whole balancing process is 0.2305 after the optimization and the balancing time is 20,100 s.  For the optimal speed balancing scheme, the structure of the balancing system is the same as shown in Figure 4. Take n = 4 and m = 4 for example, and the battery samples are not changed as shown in Figure 7. Figure 11 shows the balancing path planning scheme with the best balancing speed, that is, the shortest balancing time strategy. The horizontal and vertical coordinates represent the position coordinates of the batteries and the blue hollow circles indicate the battery cells. The batteries are numbered from left to right, 1 to 13, respectively. The yellow numbers in the hollow circles indicate the target cell. For instance, the number 1 battery position has a yellow number 3, which indicates that the number 1 battery discharge to number 3 battery through the transition node, and others are the same. In the shortest time strategy, it can be seen from the optimal path planning scheme that most of the planned paths are concentrated in the bottom equalizer and only one balancing path passes through the top layer. The battery voltages before and after equalization are shown in Figure 12. The maximum voltage difference between the batteries is within 0.1 V. The simulation results show that the loss equivalent of the whole balancing process is 0.2975 after the energy consumption of the balancing process is little, and therefore the balancing efficiency is high. The battery voltages before and after equalization are shown in Figure 10. After equalization, the maximum voltage difference between the batteries is within 0.1 V, satisfying the constraint conditions. The simulation results show that the loss equivalent of the whole balancing process is 0.2305 after the optimization and the balancing time is 20,100 s.  For the optimal speed balancing scheme, the structure of the balancing system is the same as shown in Figure 4. Take n = 4 and m = 4 for example, and the battery samples are not changed as shown in Figure 7. Figure 11 shows the balancing path planning scheme with the best balancing speed, that is, the shortest balancing time strategy. The horizontal and vertical coordinates represent the position coordinates of the batteries and the blue hollow circles indicate the battery cells. The batteries are numbered from left to right, 1 to 13, respectively. The yellow numbers in the hollow circles indicate the target cell. For instance, the number 1 battery position has a yellow number 3, which indicates that the number 1 battery discharge to number 3 battery through the transition node, and others are the same. In the shortest time strategy, it can be seen from the optimal path planning scheme that most of the planned paths are concentrated in the bottom equalizer and only one balancing path passes through the top layer. The battery voltages before and after equalization are shown in Figure 12. The maximum voltage difference between the batteries is within 0.1 V. The simulation results show that the loss equivalent of the whole balancing process is 0.2975 after the For the optimal speed balancing scheme, the structure of the balancing system is the same as shown in Figure 4. Take n = 4 and m = 4 for example, and the battery samples are not changed as shown in Figure 7. Figure 11 shows the balancing path planning scheme with the best balancing speed, that is, the shortest balancing time strategy. The horizontal and vertical coordinates represent the position coordinates of the batteries and the blue hollow circles indicate the battery cells. The batteries are numbered from left to right, 1 to 13, respectively. The yellow numbers in the hollow circles indicate the target cell. For instance, the number 1 battery position has a yellow number 3, which indicates that the number 1 battery discharge to number 3 battery through the transition node, and others are the same. In the shortest time strategy, it can be seen from the optimal path planning scheme that most of the planned paths are concentrated in the bottom equalizer and only one balancing path passes through the top layer. The battery voltages before and after equalization are shown in Figure 12. The maximum voltage difference between the batteries is within 0.1 V. The simulation results show that the loss equivalent of the whole balancing process is 0.2975 after the optimization and the balancing time is 16,400 s.

Conclusions
This paper focuses on the study of balancing path planning strategies for long-series connected battery packs under complex imbalanced conditions. Based on the influence of the equalizer-based graph model and the parameters of the specific implementation circuit, an optimal model for the balancing efficiency and the balancing speed of the two-layer balancing system is established, respectively. The corresponding constraints are established, and the ant colony algorithm is given. Finally, the optimal models are applied to 13 series connected battery packs. The simulation results show that, compared with the series connected battery packs using a simple strategy, the balancing path planning method proposed in this paper can deal well with the complex imbalanced conditions of long-series battery packs. In this way, the balancing path can be shortened and the number of energy conversions can be reduced. Both the balancing speed and the efficiency have great advantages.

Conclusions
This paper focuses on the study of balancing path planning strategies for long-series connected battery packs under complex imbalanced conditions. Based on the influence of the equalizer-based graph model and the parameters of the specific implementation circuit, an optimal model for the balancing efficiency and the balancing speed of the two-layer balancing system is established, respectively. The corresponding constraints are established, and the ant colony algorithm is given. Finally, the optimal models are applied to 13 series connected battery packs. The simulation results show that, compared with the series connected battery packs using a simple strategy, the balancing path planning method proposed in this paper can deal well with the complex imbalanced conditions of long-series battery packs. In this way, the balancing path can be shortened and the number of energy conversions can be reduced. Both the balancing speed and the efficiency have great advantages. To compare the balancing results with simple strategy and ant optimization algorithms clearly, the results are shown in Table 3.

Conclusions
This paper focuses on the study of balancing path planning strategies for long-series connected battery packs under complex imbalanced conditions. Based on the influence of the equalizer-based graph model and the parameters of the specific implementation circuit, an optimal model for the balancing efficiency and the balancing speed of the two-layer balancing system is established, respectively. The corresponding constraints are established, and the ant colony algorithm is given. Finally, the optimal models are applied to 13 series connected battery packs. The simulation results show that, compared with the series connected battery packs using a simple strategy, the balancing path planning method proposed in this paper can deal well with the complex imbalanced conditions of long-series battery packs. In this way, the balancing path can be shortened and the number of energy conversions can be reduced. Both the balancing speed and the efficiency have great advantages.