A double-layer reconfigurable battery system equalization control method based on Bellman-Ford shortest path planning algorithm

By constructing a two-layer weighted directed graph model and applying the Bellman-Ford algorithm, the problems of low computational complexity and low energy utilization in reconfigurable battery systems during large-scale expansion are solved, achieving efficient energy flow and fault isolation, and improving the overall performance and safety of the system.

CN122639397APending Publication Date: 2026-08-25ZHENJIANG HAIDA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610771693.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-01
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

When existing reconfigurable battery systems are scaled up on a large scale, they face problems such as high computational complexity, increased hardware costs, low energy utilization, and difficulty in achieving real-time optimization of control algorithms. Furthermore, traditional equalization strategies lack comprehensive modeling of switching losses, path energy losses, and battery state of charge, resulting in high system energy consumption and low efficiency.

Method used

A two-layer reconfigurable battery system equilibrium control method based on the Bellman-Ford shortest path planning algorithm is adopted. By constructing a weighted directed graph model at the unit level and module level, and combining it with the Bellman-Ford algorithm for path planning, the two-layer collaborative equilibrium control of the system is realized, reducing computational complexity and optimizing energy flow.

Benefits of technology

It improves the system's energy utilization and path optimization performance, enhances fault isolation capabilities, ensures the system's safe and stable operation, reduces energy consumption, and improves computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122639397A_ABST
    Figure CN122639397A_ABST
Patent Text Reader

Abstract

The application discloses a double-layer reconfigurable battery system equalization control method based on a Bellman-Ford shortest path planning algorithm, and comprises the following steps: constructing a unit-level weighted directed graph model of a reconfigurable battery system; constructing a module-level weighted directed graph model of the reconfigurable battery system; and according to the unit-level weighted directed graph model and the module-level weighted directed graph model, adopting the Bellman-Ford shortest path planning algorithm to perform reconfiguration control on the reconfigurable battery system, so as to realize optimal path planning of a system topology. The application realizes double-layer collaborative equalization control on the reconfigurable battery system, improves system energy utilization, path optimization performance and fault isolation capacity, and guarantees safe and stable operation of the reconfigurable battery system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of battery energy storage and relates to the optimization technology of a two-layer reconfigurable battery system. Specifically, it relates to a balanced control method for a two-layer reconfigurable battery system based on the Bellman-Ford shortest path planning algorithm. Background Technology

[0002] With the advancement of the global energy transition, large-scale battery energy storage systems play a crucial role in peak shaving, frequency regulation, and electric vehicles. However, traditional battery systems based on fixed series-parallel structures face a severe "weakest link" effect, meaning the overall system performance is limited by the worst-performing individual battery. To overcome this limitation, reconfigurable battery systems (RBS) have become a key technology for improving the flexibility and lifespan of energy storage systems by introducing a power switching matrix to dynamically adjust the battery connection relationships.

[0003] In existing research and practice, reconfigurable schemes are mainly divided into fixed topologies and single-layer reconfigurable topologies. Fixed topologies, due to their immutable physical connections, cannot isolate faulty cells or provide targeted balancing, resulting in low energy utilization. While existing single-layer reconfigurable schemes have achieved preliminary dynamic adjustment, the system faces a combinatorial explosion problem as the number of battery nodes increases: on the one hand, the number of switching elements increases linearly or even exponentially with the battery size, leading to a sharp increase in hardware costs and system internal resistance; on the other hand, the computational complexity of the control algorithm is too high when dealing with massive numbers of nodes, making it difficult to achieve real-time optimal path finding in embedded controllers.

[0004] Furthermore, traditional equalization strategies often rely on simple voltage comparisons or timing control, lacking comprehensive modeling of switching losses, path energy losses, and battery state of charge (SOC). When facing complex operating conditions, existing control methods often fail to balance equalization efficiency with system energy consumption. Therefore, how to construct a two-layer reconfigurable architecture and its corresponding path planning algorithm that can adapt to large-scale expansion while achieving refined and efficient control has become a key technical challenge that urgently needs to be addressed in the field of reconfigurable battery systems. Summary of the Invention

[0005] Purpose of the invention: To address the technical problems of inefficient path decision-making, complex balancing logic, and difficulty in coordinating energy loss during the reconfiguration process of large-scale battery systems, this invention provides a two-layer balancing control method for reconfigurable battery systems based on the Bellman-Ford shortest path planning algorithm. Through mathematical graph theory modeling and dynamic weight optimization, it achieves two-layer collaborative balancing control of the reconfigurable battery system, improving system energy utilization, path optimization performance, and fault isolation capability, and ensuring the safe and stable operation of the reconfigurable battery system.

[0006] Technical Solution: To achieve the above objectives, this invention provides a two-layer reconfigurable battery system equalization control method based on the Bellman-Ford shortest path planning algorithm, comprising the following steps:

[0007] S1: Based on reachable edges and edge weights, construct a unit-level weighted directed graph model for the reconfigurable battery system;

[0008] S2: Based on reachable edges and edge weights, construct a module-level weighted directed graph model for the reconfigurable battery system;

[0009] S3: Based on the unit-level weighted directed graph model and the module-level weighted directed graph model, the Bellman-Ford shortest path planning algorithm is used to reconfigure the reconfigurable battery system to achieve optimal path planning for the system topology.

[0010] Furthermore, in step S1, the unit-level weighted directed graph model mainly consists of each node and the reachable edges between nodes, wherein each reachable edge is defined with a corresponding edge weight.

[0011] Furthermore, the construction of the unit-level weighted directed graph model in step S1 includes:

[0012] The positive and negative terminals of the battery cells in the unit level are respectively used as vertices of the directed graph, and the positive and negative terminals of the terminals are also regarded as corresponding vertices. The energy flow path is used as the reachable edge between the vertices. The reachable edges of the directed graph are divided into two types: one is the reachable edge abstracted from the switching circuit between batteries, and the other is the reachable edge inside the battery representing the flow direction of the positive and negative terminals. At the same time, the weight of each reachable edge is determined by the number of switches between batteries and the energy loss of the path, while the edge weight between the positive and negative terminals of the battery cells is determined by the SOC of the battery.

[0013] Furthermore, the unit-level weighted directed graph model in step S1 includes the adjacency matrix corresponding to the weighted directed graph:

[0014] (1)

[0015] Among them, C n and C ′ n These represent the weights within the nth battery under discharge and charge conditions, respectively, and are directly determined by the SOC of the corresponding battery cell; w ij This represents the weight of the reachable edge from node i to node j, which is usually determined by both the cost and the number of switches. It's important to note that when switch S is detected... i1 and S i2 They cannot be closed simultaneously, because this would cause the i-th battery cell to generate a self-loop, resulting in a short circuit in the battery.

[0016] Furthermore, the edge weights in the unit-level weighted directed graph model are defined as follows:

[0017] (2)

[0018] (3)

[0019] Where n represents the number of switches between node i and node j, R c X represents the energy loss cost of a single switch in the unit level; i The SOC or voltage value of the i-th battery cell in the cell hierarchy within the interval [-1, 1] is expressed as follows:

[0020] (4)

[0021] Where, x i avg represents the voltage or SOC value of the i-th battery, and avg represents the average value.

[0022] Furthermore, the construction of the module-level weighted directed graph model in step S2 includes:

[0023] Unlike the multi-switch topology at the unit level, the module level uses a simple two-switch topology, considering only series and bypass control operations, without requiring more complex operations. Therefore, when modeling the module-level topology as a directed graph, it is only necessary to define the battery module as a node in the directed graph. The edges of the directed graph are then the switching paths, and the edge weights are determined by the module's SOC, path loss, or the number of switches. The corresponding adjacency matrix is ​​constructed as follows:

[0024] (5)

[0025] Among them, W ij The weight represents the reachability edge weight from module i to module j, primarily determined by the inter-module loss or the number of switches. It's important to note that since a single module in the module hierarchy is controlled by only two switches, and to maintain the overall normal operation of the system, the number of switches SM... i1 and switch SM i2 It is essential to ensure that one switch remains closed throughout the entire operation.

[0026] Furthermore, the edge weights in the module-level weighted directed graph model are defined as follows:

[0027] (6)

[0028] Where α and β are assigned weights, which must satisfy α + β = 1; n represents the number of switches between node i and node j, R mRepresents the energy loss cost of a single switch in the module level; Y i Represents the SOC or voltage value of the i-th battery module in the module level within the interval [-1, 1], expressed as follows:

[0029] (7) <s

[0030] where, y i Represents the voltage or SOC value of the i-th battery.

[0031] Furthermore, in step S3, the unit-level weighted directed graph model and the module-level weighted directed graph model are respectively configured with a slave controller and a master controller embedded with the Bellman-Ford shortest path planning algorithm. Among them, the master controller is responsible for maintaining the overall input and output of the system, and the slave controller is responsible for the input and output of each module.

[0032] Furthermore, the implementation process of step S3 includes:

[0033] A1: Define the source point S as the input end of the system, and set its initial distance D(S) = 0; for all other nodes v in the graph representing battery cells, modules, and connection points, initialize the distance D(v) = ∞;

[0034] A2: For the unit level, the slave controller traverses all the edges of the unit level through n - 1 loops; if the path passes through the i-th battery cell, update the cumulative cost of the path; at this time, the C in the formula i and the w in the formula<s ij together determine whether the unit is included in the current optimal path;

[0035] A3: For the module level, the master controller traverses all the edges of the module level through m - 1 loops; at this time, use the formula to calculate the edge weight W ij between modules and balance the SOC differences between modules at the system level; <s

[0036] A4: If D(i) + weight < D(j) is satisfied, then update D(j) = D(i) + weight and record the predecessor node; specifically, for the unit level, calculate D(j) = min[D(j), D(i) + w ij + C i ; for the module level, calculate D(j) = min[D(j), D(i) + W ij .[[]END]]

[0037] This invention proposes a balanced control method for a two-layer reconfigurable battery system based on the Bellman-Ford shortest path programming algorithm. This method abstracts the reconfigurable battery system topology into a directed graph, transforming the system's switching control into a path optimization problem within the directed graph. The Bellman-Ford shortest path programming algorithm is introduced to identify the most energy-efficient and suitable switching path during charging and discharging, thereby improving the system's efficiency, reliability, and maintainability. This supports the safe and efficient operation and green, low-carbon development of new energy equipment in the process of achieving carbon peaking and carbon neutrality.

[0038] In this invention, the Bellman-Ford shortest path planning algorithm is used to find the energy path with the minimum overall cost through multi-stage relaxation iteration, and it is mapped to a switch control vector that acts on the unit-level and module-level controllers, so that each battery unit and module will not have irrational charging and discharging imbalances due to inconsistent parameters or switching of operating conditions.

[0039] Beneficial effects: Compared with the prior art, the present invention has the following advantages:

[0040] 1. Constructing a two-layer reconfiguration control framework based on a directed graph model. This invention abstracts the physical connections between the unit level and the module level into weighted directed graph nodes and edges, achieving a high degree of decoupling between the physical topology and the control algorithm. At the unit level, a three-switch model is used to construct a multi-path model, and at the module level, a half-bridge model is used to simplify the system logic. A hierarchical optimization strategy significantly reduces the computational dimensionality of a single reconfiguration.

[0041] 2. Optimal energy scheduling under multiple constraints is achieved using the Bellman-Ford algorithm. This invention quantifies and integrates battery SOC or voltage with physical path costs (switching losses or internal resistance) by dynamically defining edge weights. The algorithm's relaxation operation iteratively searches for the globally optimal path, causing energy flow to automatically converge to higher-energy-level nodes during discharge and tilt towards lower-energy-level nodes during charging, thus achieving spontaneous balancing without the need for additional balancing circuitry.

[0042] 3. Introducing negative weighting processing and loop detection mechanisms to ensure system safety. Addressing the potential asymmetric energy flow in battery systems under complex operating conditions, this invention utilizes the unique negative weighting edge processing capability of the Bellman-Ford algorithm to effectively identify and avoid irrational charge-discharge cycles. Simultaneously, by detecting negative loops in the topology graph, it achieves second-level early warning and physical isolation of faulty cells or abnormal loops, improving the system's robustness in redundant operation modes. Attached Figure Description

[0043] Figure 1 This is a schematic diagram of the two-layer reconfigurable battery system targeted by the algorithm;

[0044] Figure 2 This is a schematic diagram of the unit-level topology;

[0045] Figure 3 It is a weighted directed graph model of the unit-level charging process;

[0046] Figure 4 It is a weighted directed graph model of the unit-level discharge process;

[0047] Figure 5 This is a schematic diagram of the module hierarchy topology;

[0048] Figure 6 It is a weighted directed graph model of the module-level charging process;

[0049] Figure 7 It is a weighted directed graph model of the module-level discharge process;

[0050] Figure 8 This is a graph showing the change in unit SOC after the algorithm achieves balanced control at the unit level;

[0051] Figure 9 This is a graph showing the change in SOC of a cell after the algorithm achieves cell fault isolation at the cell level.

[0052] Figure 10 This is a graph showing the changes in module SOC when the algorithm implements system equilibrium control at the module level.

[0053] Figure 11 This is a graph showing the changes in SOC of a module after the algorithm isolates faulty modules at the module level. Figure 12 This is a schematic diagram of the control flow of the method of the present invention. Detailed Implementation

[0054] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading this invention, any modifications of the invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0055] Example 1:

[0056] This embodiment provides a balanced control method for a two-layer reconfigurable battery system based on the Bellman-Ford shortest path planning algorithm. The two-layer topology used in the system is as follows: Figure 1 As shown, Figure 12 As shown, it includes the following steps:

[0057] S1: Based on reachable edges and edge weights, construct a unit-level weighted directed graph model for the reconfigurable battery system;

[0058] The unit-level weighted directed graph model mainly consists of nodes and reachable edges between nodes, where each reachable edge has a defined edge weight.

[0059] The construction of a unit-level weighted directed graph model includes:

[0060] like Figure 2 The diagram shows a unit-level topology, with each battery unit controlled by three main switches. The positive and negative terminals of the battery units in the unit level are considered vertices of a directed graph, with the positive and negative terminals of the terminals also considered as corresponding vertices. The energy flow paths are represented as reachable edges between vertices. These reachable edges come in two forms: one is an abstract reachable edge representing the switching circuits between batteries, and the other is a reachable edge within the battery representing the flow direction between the positive and negative terminals. The charging and discharging model is shown below. Figure 3 and Figure 4 As shown; meanwhile, the weight of each reachable edge is determined by the number of switches between batteries and the path energy loss, while the edge weight between the positive and negative electrodes of the battery cell is determined by the battery's SOC.

[0061] The unit-level weighted directed graph model includes the adjacency matrix corresponding to the weighted directed graph:

[0062] (1)

[0063] Among them, C n and C ′ n These represent the weights within the nth battery under discharge and charge conditions, respectively, and are directly determined by the SOC of the corresponding battery cell; w ij This represents the weight of the reachable edge from node i to node j, which is usually determined by both the cost and the number of switches. It's important to note that when switch S is detected... i1 and S i2 They cannot be closed simultaneously, because this would cause the i-th battery cell to generate a self-loop, resulting in a short circuit in the battery.

[0064] In a unit-level weighted directed graph model, the edge weights are defined as follows:

[0065] (2)

[0066] (3)

[0067] Where n represents the number of switches between node i and node j, R c X represents the energy loss cost of a single switch in the unit level; i The SOC or voltage value of the i-th battery cell in the cell hierarchy within the interval [-1, 1] is expressed as follows:

[0068] (4)

[0069] Where, x i avg represents the voltage or SOC value of the i-th battery, and avg represents the average value.

[0070] S2: Based on reachable edges and edge weights, construct a module-level weighted directed graph model for the reconfigurable battery system;

[0071] The construction of a module-level weighted directed graph model includes:

[0072] like Figure 5 The diagram shows a module-level topology, with each battery module controlled by two main switches. Unlike the multi-switch topology of the unit level, the module level uses a simple two-switch topology, considering only series and bypass control operations, without requiring more complex operations. Therefore, when modeling the module-level topology as a directed graph, it is only necessary to define the battery module as a node in the directed graph. In this case, the edges of the directed graph are the switch paths, and the edge weights are determined by the module's SOC, path loss, or the number of switches.

[0073] Weighted directed graph model under charge and discharge conditions, such as Figure 6 and Figure 7 As shown. The corresponding adjacency matrix is ​​constructed as follows:

[0074] (5)

[0075] Among them, W ij The weight represents the reachability edge weight from module i to module j, primarily determined by the inter-module loss or the number of switches. It's important to note that since a single module in the module hierarchy is controlled by only two switches, and to maintain the overall normal operation of the system, the number of switches SM... i1 and switch SM i2 It is essential to ensure that one switch remains closed throughout the entire operation.

[0076] In a module-level weighted directed graph model, the edge weight is defined as:

[0077] (6)

[0078] Where α and β are assigned weights, which must satisfy α + β = 1; n represents the number of switches between node i and node j, R m Y represents the energy loss cost of a single switch in the module hierarchy; i The SOC or voltage value of the i-th battery module in the module hierarchy within the interval [-1, 1] is expressed as follows:

[0079] (7)

[0080] Among them, y i represents the voltage or SOC value of the i-th battery.

[0081] S3: According to the unit-level weighted directed graph model and the module-level weighted directed graph model, use the Bellman-Ford shortest path planning algorithm to perform reconstruction control on the reconfigurable battery system to achieve the optimal path planning of the system topology.

[0082] Due to the adoption of a two-layer architecture, in order to achieve more efficient control, this embodiment adopts a distributed control method. The unit-level weighted directed graph model and the module-level weighted directed graph model are respectively configured with slave controllers and master controllers embedded with the Bellman-Ford shortest path planning algorithm. Among them, the master controller is responsible for maintaining the overall input and output of the system, and the slave controller is responsible for the input and output of each module.

[0083] The implementation process of step S3 includes:

[0084] A1: Define the source point S as the system input end, and set its initial distance D(S)=0; for all other nodes v in the graph representing battery cells, modules, and connection points, initialize the distance D(v)=∞;

[0085] A2: For the unit level, the slave controller traverses all the edges at the unit level through 3 loops; if the path passes through the i-th battery cell, update the cumulative cost of this path; at this time, the formula where C i and the formula where w ij together determine whether this unit is included in the current optimal path;

[0086] If D(i)+ w ij +C i < D(j), then update D(j)= D(i)+w ij +C i , and record the predecessor node. Specifically, calculate D(j)=min[D(j), D(i)+w ij +C i . Calculate D(j)=min[D(j), D(i)+W ij ;

[0087] A3: For the module level, the master controller traverses all the edges at the module level through 3 loops; at this time, use the formula to calculate the edge weight W ij between modules, and balance the SOC difference between modules at the system level;

[0088] If D(i)+ Wij If D(j), then update D(j) = D(i) + W ij , and record the predecessor node. Specifically, calculate D(j) = min[D(j), D(i) + W ij .

[0089] During operation, if a negative cycle is detected, force bypass the relevant faulty unit or module to ensure system safety.

[0090] In the energy recovery scenario, the priority coefficient of high-energy-level nodes may cause the local edge weights to exhibit negative characteristics. Through its unique negative-weight handling mechanism, the algorithm can ensure that during the charging process, the energy flows to nodes with low SOC levels, thus achieving a balanced energy flow solution globally.

[0091] When the algorithm completes the relaxation iteration of all nodes, by backtracking from the system output end to the source point, a physical connection path that meets the current load demand and has the minimum comprehensive cost can be obtained. This path directly corresponds to the switch control vector in the controller. It should be noted that the algorithm's unique negative cycle detection mechanism is used to identify irrational charge-discharge loops caused by extreme inconsistencies or faults. If a negative cycle is detected, force bypass the relevant faulty unit to ensure system safety.

[0092] If, after the algorithm has undergone the specified V - 1 relaxation traversals and during the final traversal verification, the inequality D(i) + W ij < D(j) still holds, it means that there is a negative-weight loop, i.e., a negative cycle, in the system path.

[0093] During the implementation of the balancing control process, in the charging state, the algorithm defines high-SOC nodes as low-cost paths, enabling the discharge energy flow to preferentially pass through high-energy-level batteries. Due to the high edge-weight cost value of low-SOC batteries, they are excluded from the shortest path by the algorithm, triggering the bypass switch action and entering the static balancing state. In the discharge state, it is necessary to reverse the edge-weight logic of the algorithm and define low-SOC nodes as low-cost paths. The charging current preferentially flows to low-SOC batteries for fast recharge, and high-SOC batteries are bypassed after reaching the threshold to prevent overcharging and achieve overall battery pack balance.

[0094] During the balancing control process, if a single battery cell or module experiences thermal runaway or communication failure: the algorithm sets the weights of the corresponding node and its connected edges to infinity. The Bellman - Ford algorithm will automatically bypass this node in the next iteration and re-plan the optimal path among the remaining redundant battery units. The controller drives the MOS switch action according to the newly generated path vector to achieve second-level fault isolation and system topology reconstruction, ensuring uninterrupted load power supply.

[0095] Embodiment 2:

[0096] To verify the effectiveness and efficacy of the present invention, the following experiments and data analysis were conducted in this embodiment:

[0097] Using the BBDST operating condition, the SOC equalization control of both the cell layer and the module layer was verified under operating conditions. Simultaneously, to verify the ability of the method to handle fault conditions, fault conditions of the battery cells and modules were simulated, with a focus on observing the SOC control changes at the cell layer and module layer under fault conditions.

[0098] like Figure 8 As shown, in the face of inconsistent SOC among battery cells at the cell level, the method of this invention can respond quickly, achieving efficient convergence of the SOC curves of each cell in the early to mid-stages of discharge (approximately 2500 seconds). During subsequent severe dynamic fluctuations, the algorithm demonstrates strong micro-adjustment and tracking capabilities through real-time path optimization, ensuring a high degree of consistency in the SOC of each battery cell at the cell level. Furthermore, the overall energy loss rate under all operating conditions is only 1.03%, indicating that the proposed method achieves high energy utilization in cell-level applications.

[0099] like Figure 9 As shown, taking the failure of the second battery cell as an example, the method of the present invention demonstrates excellent fault-tolerant operation and topology reconstruction capabilities. It can effectively identify and physically isolate the faulty cell, while dynamically correcting the weight matrix to replan the optimal path. The remaining healthy cells are not only undisturbed under the reconstructed topology, but also achieve an end-point SOC equalization accuracy of 0.0001.

[0100] like Figure 10 As shown, the equilibrium control strategy proposed in this invention still possesses excellent applicability and dynamic optimization capabilities at a larger system level. Under the drastically fluctuating discharge conditions of BBDST, facing the significant SOC dispersion among modules in the initial stage, the system achieves the first efficient convergence of the SOC trajectories of the four modules smoothly and rapidly in the early stage of discharge (within approximately 2000s) through real-time topology adjustment. After undergoing a long-term, high-intensity test of 6000s, the equilibrium convergence degree among modules reaches 0.9696, and the maximum SOC range at the end is strictly locked within 0.02, effectively eliminating the "bottleneck effect" among modules.

[0101] like Figure 11As shown, the reconfigurable equalization control strategy proposed in this invention also possesses excellent fault-tolerant operation and topology reconfiguration capabilities at the large-scale battery system level. When the hypothetical second module fails, the proposed method can respond by physically isolating it through a switching matrix. Simultaneously, the Bellman-Ford algorithm automatically removes the faulty node and replans the optimal low-loss path. The remaining healthy modules are not adversely affected under the reconfigured topology, achieving rapid convergence within 1800 seconds.

Claims

1. A balanced control method for a two-layer reconfigurable battery system based on the Bellman-Ford shortest path programming algorithm, characterized in that, The steps include the following: S1: Based on reachable edges and edge weights, construct a unit-level weighted directed graph model for the reconfigurable battery system; S2: Based on reachable edges and edge weights, construct a module-level weighted directed graph model for the reconfigurable battery system; S3: Based on the unit-level weighted directed graph model and the module-level weighted directed graph model, the Bellman-Ford shortest path planning algorithm is used to reconfigure the reconfigurable battery system to achieve optimal path planning for the system topology.

2. The equalization control method for a two-layer reconfigurable battery system based on the Bellman-Ford shortest path programming algorithm according to claim 1, characterized in that, In step S1, the unit-level weighted directed graph model consists of each node and the reachable edges between nodes, wherein each reachable edge is defined with a corresponding edge weight.

3. The equalization control method for a two-layer reconfigurable battery system based on the Bellman-Ford shortest path programming algorithm according to claim 2, characterized in that, The construction of the unit-level weighted directed graph model in step S1 includes: The positive and negative terminals of the battery cells in the unit level are respectively used as vertices of the directed graph, and the positive and negative terminals of the terminals are also regarded as corresponding vertices. The energy flow path is used as the reachable edge between the vertices. The reachable edges of the directed graph are divided into two types: one is the reachable edge abstracted from the switching circuit between batteries, and the other is the reachable edge inside the battery representing the flow direction of the positive and negative terminals. At the same time, the weight of each reachable edge is determined by the number of switches between batteries and the energy loss of the path, while the edge weight between the positive and negative terminals of the battery cells is determined by the SOC of the battery.

4. The equalization control method for a two-layer reconfigurable battery system based on the Bellman-Ford shortest path programming algorithm according to claim 3, characterized in that, The unit-level weighted directed graph model in step S1 includes the adjacency matrix corresponding to the weighted directed graph: (1); Among them, C n and C ′ n These represent the weights within the nth battery under discharge and charge conditions, respectively, and are directly determined by the SOC of the corresponding battery cell; w ij This represents the weight of the edge that can be reached from the i-th node to the j-th node.

5. The equalization control method for a two-layer reconfigurable battery system based on the Bellman-Ford shortest path programming algorithm according to claim 4, characterized in that, In the unit-level weighted directed graph model, the edge weights are defined as follows: (2); (3); Where n represents the number of switches between node i and node j, R c X represents the energy loss cost of a single switch in the unit level; i The SOC or voltage value of the i-th battery cell in the cell hierarchy within the interval [-1, 1] is expressed as follows: (4); Where, x i avg represents the voltage or SOC value of the i-th battery, and avg represents the average value.

6. The equalization control method for a two-layer reconfigurable battery system based on the Bellman-Ford shortest path programming algorithm according to claim 5, characterized in that, The construction of the module-level weighted directed graph model in step S2 includes: The battery module is defined as a node in a directed graph, where the edges of the directed graph are switching paths, and the edge weights are determined by the module's SOC, path loss, or the number of switches; the corresponding adjacency matrix is ​​constructed as follows: (5); Among them, W ij This represents the weight of the reachable edge from the i-th module to the j-th module.

7. The equalization control method for a two-layer reconfigurable battery system based on the Bellman-Ford shortest path programming algorithm according to claim 6, characterized in that, In the module-level weighted directed graph model, the edge weights are defined as follows: (6); Where α and β are assigned weights, which must satisfy α + β = 1; n represents the number of switches between node i and node j, R m Y represents the energy loss cost of a single switch in the module hierarchy; i The SOC or voltage value of the i-th battery module in the module hierarchy within the interval [-1, 1] is expressed as follows: (7); Among them, y i This represents the voltage or SOC value of the i-th battery.

8. The equalization control method for a two-layer reconfigurable battery system based on the Bellman-Ford shortest path programming algorithm according to claim 7, characterized in that, In step S3, the unit-level weighted directed graph model and the module-level weighted directed graph model are respectively configured with a slave controller and a master controller that embed the Bellman-Ford shortest path planning algorithm. The master controller is responsible for maintaining the overall input and output of the system, while the slave controller is responsible for the input and output of each module.

9. A method for equalization control of a two-layer reconfigurable battery system based on the Bellman-Ford shortest path programming algorithm according to claim 8, characterized in that, The implementation process of step S3 includes: A1: Define the source point S as the system input terminal and set its initial distance D(S) = 0; for all other nodes v in the figure that represent battery cells, modules and connection points, initialize the distance D(v) = ∞; A2: For the cell level, the subordinate controller traverses all edges of the cell level through n-1 loops; if the path passes through the i-th battery cell, the cumulative cost of that path is updated; at this time, the formula... C in i With the formula w ij Together, they determine whether the unit is included in the current optimal path; A3: For the module level, the main controller traverses all edges of the module level through m-1 loops; at this time, using the formula... Calculate the edge weight W between modules ij To balance the SOC differences between modules at the system level; A4: If D(i) + weight < D(j), then update D(j) = D(i) + weight and record the predecessor node; specifically, for the unit level, calculate D(j) = min[D(j), D(i) + w ij +C i ; for the module level, calculate D(j) = min[D(j), D(i) + W ij .